Navbar, tabbar


Install
npx shadcn add @klarhimmel/navbar-tabbarDetailsAbout, usage, props and more
A row of three to five equally spaced tabs, each an icon above a short label, as native links with the current one marked and filled.
Import
Import
- navigation/tabbar
- About
- A row of three to five equally spaced tabs, each an icon above a short label, as native links with the current one marked and filled. It is drawn in the section, a bar with a top rule, never fixed to the screen.
- Category
- The bar at the top of every page: brand, links, one action. New project? Set it up once: /get-started/installation.
Notes
When to use it
Pick it for an app-style row of three to five destinations, each an icon above a short label, with the current one filled. For a header with a brand and links use navbar-simple; for an icon column beside the page use app-sidebar-rail.
Writing for it
- Three to five tabs. A label holds 20 characters, so name the place in one word or two. - Each icon is chosen by name from the shared set; mark exactly one tab current. - The navigation name holds 40 characters and is read aloud, never drawn.
Watch out for
The bar sits in the page flow, not fixed to the screen, so place it last in an app screen. A sixth tab or a long label squeezes the others, so cut a tab instead.
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | 'Name this navigation' | Text, up to 40 characters. |
tabs | { label, icon, href, current }[] | 4 items | List of 3 to 5. Each item: label, icon ('zap' | 'shield' | 'layers' | 'globe' | 'sparkles' | 'clock' | 'code' | 'palette' | 'lock' | 'chart' | 'users' | 'mail' | 'heart' | 'rocket' | 'search' | 'settings' | 'check' | 'star' | 'book' | 'box' | 'cloud' | 'compass' | 'leaf' | 'gauge'), href, current. |