#460
Line
Tabs with variant="line": bare text tabs with an underline on the active one, used as a view switcher with no panels.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Line" pattern (@codeatlasdev/ui demo #460, navigation/tabs) in my app.
Call get_demo({ ids: ["#460"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Page headers and view switchers where the tabs change what the page shows, not a panel under the list.
Keep these library parts, with the props and tokens the demo uses:
- Tabs, TabsList, TabsTrigger from "@codeatlasdev/ui"
Behaviour to keep:
- `<Tabs bind:value={view} variant="line">` with `<TabsList aria-label="View">`
- 3 triggers: `board`, `list`, `timeline`, each with a `data-testid` forwarded to the button
- No `TabsContent`: triggers carry no `aria-controls`
- A line below the tabs reads `Showing the {view} view.`
- Wrapper is `.wrap` with `max-width: 420px`
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- Tabs
@codeatlasdev/ui - TabsList
@codeatlasdev/ui - TabsTrigger
@codeatlasdev/ui
How it is built
- `<Tabs bind:value={view} variant="line">` with `<TabsList aria-label="View">`
- 3 triggers: `board`, `list`, `timeline`, each with a `data-testid` forwarded to the button
- No `TabsContent`: triggers carry no `aria-controls`
- A line below the tabs reads `Showing the {view} view.`
- Wrapper is `.wrap` with `max-width: 420px`
Related
Loading source.