Components/Data Display
Tabbed panels with a sliding light indicator and roving focus.
Profile
This is how your name appears on deployments and comments.
Installation#
npx shadcn@latest add https://get-neonkit.vercel.app/r/tabs.jsonUsage#
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
<Tabs defaultValue="account">
<TabsList>
<TabsTrigger value="account">Account</TabsTrigger>
<TabsTrigger value="password">Password</TabsTrigger>
</TabsList>
<TabsContent value="account">…</TabsContent>
<TabsContent value="password">…</TabsContent>
</Tabs>Examples#
Underline
variant="underline" draws a glowing line on a hairline track. Good for code.
npx shadcn@latest add https://get-neonkit.vercel.app/r/tabs.jsonColors
Every Tabs gets its own indicator, so several can sit side by side.
9,617
Visitors
214
Deployments
27
Errors
Manual activation
Arrow keys move focus; Enter or Space selects. Disabled tabs are skipped.
API reference#
Tabs
Renders a div and accepts every native div attribute.
| Prop | Type | Default |
|---|---|---|
defaultValue | stringInitially selected tab when uncontrolled. | — |
value | stringSelected tab when controlled. | — |
onValueChange | (value: string) => voidCalled when the selection changes. | — |
variant | "pill" | "underline"Indicator style. | "pill" |
activationMode | "automatic" | "manual"Select on focus, or wait for Enter and Space. | "automatic" |
color | NeonColorPalette name or hex. Falls back to --neon-accent, then cyan. | inherited |
TabsTrigger
Renders a button.
| Prop | Type | Default |
|---|---|---|
value | stringMatches a TabsContent value. | — |
disabled | booleanSkipped by the keyboard and not clickable. | false |
TabsContent
Renders a div that fades in when selected.
| Prop | Type | Default |
|---|---|---|
value | stringMatches a TabsTrigger value. | — |
forceMount | booleanKeeps the panel mounted but hidden while inactive, so its state survives. | false |
Accessibility#
- Follows the WAI-ARIA tabs pattern: tablist, tab and tabpanel roles, with aria-selected and aria-controls wired up.
- Only the selected tab is in the Tab order. Left and Right arrows move between tabs, Home and End jump to the ends.
- Panels are focusable so keyboard users can reach content without interactive elements.
- The indicator jumps instead of sliding when the user prefers reduced motion.