Default
Show the codeHide the code
Default, code
<TabBar fixed={false} />Bottom navigation between the top-level screens of a mobile app: icon plus label, current screen marked.
Still previews of the real component, rendered from its stories. Pro code isn’t public, so nothing in them responds. Switch the theme and density for every preview at once.
Default, code
<TabBar fixed={false} />The 10 design tokens TabBar reads, with the value each has in the theme and density chosen above. Change a token and the component follows, in Figma and in code.
| Token | Value now | CSS variable |
|---|---|---|
| color.action.danger | … | --sd-color-action-danger |
| color.bg.brand-subtle | … | --sd-color-bg-brand-subtle |
| color.bg.canvas | … | --sd-color-bg-canvas |
| color.border.default | … | --sd-color-border-default |
| color.icon.brand | … | --sd-color-icon-brand |
| color.text.default | … | --sd-color-text-default |
| color.text.on-action | … | --sd-color-text-on-action |
| color.text.secondary | … | --sd-color-text-secondary |
| layer.sticky | … | --sd-layer-sticky |
| radius.full | … | --sd-radius-full |
Pro components come as source from the SuperDuper registry, with a licence key from Solo, Team or Studio. The registry and checkout aren’t open yet.
Add it from the registry (Pro licence key)
npx shadcn@latest add @superduperui/tab-barThen import it
import { TabBar } from "@/components/ui/tab-bar"| Prop | Type | What it does |
|---|---|---|
itemsrequired | TabBarItem[] | |
aria-label | stringDefault 'Main' | Names the navigation landmark. Default "Main". |
fixed | booleanDefault true | Pin to the bottom of the viewport. Default true. |
className | string |
Screen readers announce "Main, navigation" then "Home, current page, link".
WCAG 2.2 AAA criteria the component meets in Comfortable density: 1.4.6, 1.4.9, 2.1.3, 2.3.2, 2.4.13, 2.5.5, 2.5.6.
Compact density meets AA (2.5.8, 24px targets), not AAA.
Shared patterns it ships with: 2.4.8 (aria-current="page").
| axe-core (WCAG A, AA, AAA and best practice) | 40 runs across every story, theme, density and width: 0 violations |
|---|---|
| Rendered text contrast | 175 text runs: 0 below 7:1, lowest 8.43:1 |
| Target size | 48 targets: 0 under 44px in Comfortable |
| Focus appearance (2.4.13) | 72 focus stops in 3 browser engines: all pass |
| Keyboard script | Chromium 3 of 3, Firefox 3 of 3, WebKit 3 of 3 |
Manual passes with VoiceOver and NVDA haven’t been done yet.
Each step is scripted and run in Chromium, Firefox and WebKit.
| Key | What happens |
|---|---|
| Tab | Tab reaches the current screen |
| Tab | Tab moves along; the badge count is part of the name |
| Enter | Enter goes to the screen |
The Figma component is TabBar. The Figma library isn’t published yet.
Figma to code: Items → items; nested Item → items.