Fluid Tabs
Use Fluid Tabs to switch between related views while keeping the selected surface visually connected. The active capsule or underline moves between items for pointer input and updates immediately for keyboard input.
Preview
Project overview
A clear view of what is ready and what needs attention.
3 active projects
Recent activity
Maya updated the interaction review two hours ago.
12 updates this week
Workspace settings
Manage your team, notifications, and preferences.
Personal workspace
Basic usage
Examples
Use the capsule variant for compact segmented navigation and the underline variant for editorial navigation. Controlled state works well when the selected view is reflected in the URL.
Usage
API
| Property | Type | Default | Description |
|---|---|---|---|
tabs | FluidTabItem[] | required | Tabs displayed in the horizontal tab list. |
value | string | — | Controlled active tab value. |
defaultValue | string | — | Initially active tab for uncontrolled usage. |
onValueChange | (value: string) => void | — | Called when the active tab changes. |
variant | "capsule" | "underline" | "capsule" | Visual treatment for the active surface. |
size | "sm" | "md" | "lg" | "md" | Size of the tab triggers. |
ariaLabel | string | "Tabs" | Accessible label for the tab list. |
activeIndicatorClassName | string | Capsule uses the active surface token; underline uses foreground. | Styling hook for the active surface. |
hoverClassName | string | "bg-[var(--fluid-tabs-hover)]" | Optional styling hook for the supporting hover cue. |
className | string | — | Additional classes for the root container. |
listClassName | string | — | Additional classes for the tab list. |
Accessibility
Fluid Tabs uses Base UI tab semantics and keyboard navigation. Horizontal overflow keeps the active item available in narrow containers.
Styling
The fluid-tabs token set controls the surface and indicator treatment. Reduced-motion preferences keep selection feedback without the travelling transition.
Contact
Found a bug or need help using this component? Open an issue on GitHub.
License & Usage
Sona UI is available under the MIT license. You may use, modify, and distribute this component in personal and commercial projects.
Was this page helpful?
Your response helps us improve component docs.