No.288 · Navigation
Glass Tab Bar
A floating tab bar made of glass: the selection is a clear droplet that slides between tabs, stretching as it travels and magnifying the icon it settles on, while the page scrolls blurred beneath.
The prompt
The design brief behind this component — reuse it to regenerate, remix, or explain it.
Design a floating, iOS-style tab bar in liquid glass, over content that scrolls beneath it. The bar is a pill of frosted glass (42% white, backdrop blur 18px with saturate 1.9, a bright 1px top edge, a softer lower edge, a white hairline and a soft shadow); a separate round glass search button sits beside it. The selection is a second, clearer piece of glass inside the bar — a 'droplet' pill with a white top-to-translucent gradient, a crisp inner highlight and a small shadow. It moves by animating left and right independently: the leading edge first and the trailing edge 90ms later (swapped by direction), both 520ms on cubic-bezier(0.16,1,0.3,1), so it stretches like water between tabs before settling. The icon under the droplet springs to 1.16× (overshoot) and takes the tint colour with a light fill, as if seen through a lens. Tabs are icon-over-label, 11px labels. ←/→ move between tabs (roving tabindex). Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Tap or click a tab; ←/→ move the selection. Motion: Droplet edges 520ms expo-out with a 90ms directional lag; icon magnify 520ms spring. Accessibility: role=tablist with role=tab buttons, aria-selected and roving tabindex; the droplet is decorative. Reduced motion makes the droplet jump. Responsive behavior: Intrinsic width; designed to float over mobile layouts, works on desktop too. Touch: Built for thumbs: 48px targets and no hover dependence. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.
Notes
- Interaction
- Tap or click a tab; ←/→ move the selection.
- Motion
- Droplet edges 520ms expo-out with a 90ms directional lag; icon magnify 520ms spring.
- Accessibility
- role=tablist with role=tab buttons, aria-selected and roving tabindex; the droplet is decorative. Reduced motion makes the droplet jump.
- Responsive
- Intrinsic width; designed to float over mobile layouts, works on desktop too.
- On touch
- Built for thumbs: 48px targets and no hover dependence.