Tabs
Liquid Glass Tabs, Segmented Control, and Floating Tab Bar built to Apple iOS 27 and macOS 27 guidelines, featuring press-and-drag liquid lens magnification and automatic responsive adaptation.
Built on @base-ui/react/tabs, @liqui-design/glass, and motion/react, faithfully following Apple iOS 27 (Segmented Controls / Tab Bars) and Apple macOS 27 (Segmented Controls):
- Dynamic liquid droplet lens: Clicking or pressing and dragging the active capsule horizontally lifts it into a crystal-clear optical lens (
blur: 0,dispersion: 0.06) that magnifies and refracts labels beneath it with velocity-driven squash and stretch. - Viewport responsive: Automatically adapts sizing, radii, icon/label stacking, and spring damping between
< 768px(iOS 27) and>= 768px(macOS 27).
Floating Liquid Glass (Glass)
Click to switch, or press and drag the active capsule left and right to watch the liquid lens magnify and disperse the underlying text:
Installation (Shadcn Registry)
# Install via the configured @apple-liquid namespace
npx shadcn@latest add @apple-liquid/tabs
# Or install directly via URL
npx shadcn@latest add https://your-domain.com/r/tabs.jsonFloating Tab Bar (iOS 27 ↔ macOS / iPad 27)
A single variant="tab-bar" adapts automatically across breakpoints:
- Mobile (
< 768px): Signature iOS 2762pxfloating glass pill with stacked icons and11pxlabels, Apple Blue#0088FF/#0091FFactive tint, and drag-to-scrub switching. - Desktop (
>= 768px): Expands into an iPad / macOS 2744pxhorizontal icon + label floating pill navigation bar.
Segmented Control (Default)
Aligned with iOS 27 (44px capsule track) and macOS 27 (32px compact capsule track), with the same refractive droplet while dragging:
Minimal Underline (Line)
Ideal for content sections, forms, and settings pages with an Apple Blue spring underline indicator:
Vertical Glass Tabs
Pass orientation="vertical" for a floating vertical Liquid Glass tab rail:
Usage
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
export function Example() {
return (
<Tabs defaultValue="glass">
<TabsList glass>
<TabsTrigger value="glass">Liquid Glass</TabsTrigger>
<TabsTrigger value="optics">Refraction</TabsTrigger>
<TabsTrigger value="motion">Motion</TabsTrigger>
</TabsList>
<TabsContent value="glass">Tab panel content...</TabsContent>
</Tabs>
);
}Props API
TabsList
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'default' | 'tab-bar' | 'line' | 'default' | Layout mode: default segmented control, tab-bar responsive icon bar, line minimal underline |
glass | boolean | true | Liquid Glass material (false renders 100% opaque segmented/tab bar and solid spring thumb; ignored for line) |
refraction | number | 28 | Convex lens refraction strength (px) for the dragged liquid droplet |
dispersion | number | 0.055 | Subtle RGB chromatic dispersion at droplet edges (0 disables) |
disableMotion | boolean | false | Disable drag scrubbing and refractive lens effects (respects prefers-reduced-motion) |
Table
Apple 27 Finder-style list table with hairline row dividers, subtle hover highlights, accent-tinted selected rows, and semibold secondary headers (15px mobile ↔ 13px desktop).
Textarea
Responsive Apple Liquid Glass multiline text input featuring CSS field-sizing-content auto-growth, 3.5px Apple Blue focus ring, and default / over-glass / glass surface variants.