Skip to content
esc

TabBar

Navigationshadcn/ui

Bottom navigation of a mobile app with 3 to 5 destinations: icon over a short label, the active one in the default text color, optional unread badge.

When to use

  • Keep 3 to 5 items, always with labels.
  • Pin it with fixed bottom-0 inset-x-0 and add bottom padding to the page.
  • Don't use it on desktop; use Sidebar.
  • Don't put actions (like 'New payment') in it; it only switches sections.

Accessibility

Role
navigation with links
Keyboard
Tab moves between items. Enter opens.
Notes
Give the nav an aria-label such as 'Main'.
Note
The badge count is read as ', 3 new'.

Props

  • icon

    ReactNode

    A lucide icon.

  • label

    string

    One word: Home, Cards, Activity.

  • active= false

    boolean

    Current section; sets aria-current='page'.

  • badge

    number

    Unread count.

  • asChild= false

    boolean

    Pass your router link as the only child: <TabBarItem asChild icon={…} label='Home'><NextLink href='/' /></TabBarItem>.

Prompt for your agent

Use the UnbuiltUI TabBar. Call unbuilt_get_component("TabBar") first and follow its spec: variants, states, usage rules and accessibility.

unbuilt_get_component returns

0 variants4 states5 props4 usage rules4 a11y notes6 tokens1 example

Add it with shadcn

$npx shadcn add https://unbuiltui.com/r/tab-bar.json

Tokens · 6

bg.canvasborder.subtlefg.subtlefg.defaultdanger.defaultfg.on-accent