Tab bar
npx shadcn add https://ui.klarhimmel.com/r/tab-bar.jsonCopy for AIDetailsAbout, usage, props and more
An app's main places as a bar at the foot of a phone screen, beside a Sidebar that takes over on wider screens.
Preview
Your projects
Import
Import
- Files
- tab-bar.tsx, in components/klarhimmel/ui/. With it: theme, utils.
- Render in
- Render it inside <Theme>, once near the root of your app. Tokens and fonts are scoped to it, so outside it the component is unstyled.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | TabBarItem[] | required | Required. Three to five places; icon is a component such as a lucide icon. |
label | string | 'Main' | The nav's accessible name. |
link | (props: { href: string; className: string; children: ReactNode; current?:… | plainLink | Renders each tab, for a router's Link; keep className and aria-current. |
className | string | - | Extra classes, merged after the component's own. |