A pill-style tab list where the selected indicator springs between tabs, built on the WAI-ARIA tabs pattern with full roving-focus keyboard support.
Dependencies
Interaction Type
Click a tab or use Arrow/Home/End keys while a tab is focused to move the selection. The indicator springs to the new tab.
Props
Options you can pass to customize this component.
valueControlled selected tab value.
defaultValueInitial selected tab for uncontrolled usage.
onValueChangeCalled with the new value when the selection changes.
idPrefixPrefix used to build stable ids for ARIA wiring across SSR/CSR.
Installation
How to use
import { TabsSubtle, TabsSubtleItem, TabsSubtlePanel } from "@/components/ui/tabs-subtle"
export function Demo() {
return (
<>
<TabsSubtle defaultValue="overview">
<TabsSubtleItem value="overview" label="Overview" />
<TabsSubtleItem value="activity" label="Activity" />
<TabsSubtleItem value="settings" label="Settings" />
</TabsSubtle>
<TabsSubtlePanel value="overview">Overview content</TabsSubtlePanel>
<TabsSubtlePanel value="activity">Activity content</TabsSubtlePanel>
<TabsSubtlePanel value="settings">Settings content</TabsSubtlePanel>
</>
)
}Source Code
Click the code icon in the top-right corner to view the source code.
License & Usage
// No code loaded.