Brandon Dail
banner
brandondail.com
Brandon Dail
@brandondail.com
Staff Engineer at Discord working on Design Systems, Accessibility, Other Stuff™️ Collage & generative plotter artist 👋
A bonus technical detail: this all works seamlessly with any number of tabs AND if you dynamically add or remove tabs. This almost never happens but it helps me sleep at night knowing that the system is resilient and it’s good signal we have the right state abstractions in place
November 7, 2024 at 3:42 PM
When you over scroll the content area the active indicator will “squish” against the edge in the direction you are over scrolling.

This uses the same scaleX/translateX approach that the stretch effect uses.
November 7, 2024 at 3:26 PM
The active tab indicator syncs up with the tab content horizontal scroll position of the tab content area. The scroll area has snapping enabled and once you scroll past the snap threshold the active tab text color will apply to the tab that would be active if you stopped the scroll gesture.
November 7, 2024 at 3:23 PM
When you press down on a tab that isn’t selected, the active tab indicator will “stretch” towards that option.

This is done with a scaleX transform that increases the indicator with, paired with a translateX transform that makes sure the scale transform doesn’t affect the position of the indicator
November 7, 2024 at 3:21 PM
if you need a distraction, here’s a gorilla body slamming its siblings at the Atlanta Zoo today
November 5, 2024 at 7:28 PM