Navbar, utility bar


Install
npx shadcn add https://ui.klarhimmel.com/r/navbar-utility.jsonDetailsAbout, usage, props and more
Two rows: a slim tinted utility bar (a note on the left, phone, language or sign-in links on the right) above the main row with brand, up to six links and one call to…
Import
Import
- navigation/utility
- header/utility
- About
- Two rows: a slim tinted utility bar (a note on the left, phone, language or sign-in links on the right) above the main row with brand, up to six links and one call to action.
- 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
A two-row header for businesses with practical facts to show at all times, such as opening hours, a phone number or a language switch. If you have nothing to put in the thin top row, navbar-simple is cleaner.
Writing for it
- The note holds 80 characters on the left of the top row. Put one fact there, like delivery terms or opening hours, and leave it empty to hide it. - Utility takes up to three quiet links, such as a tel: link, a language link and a booking link. Short labels keep them on one line. - The brand is optional here (40 characters), which suits a site where a logo image is added by the host page instead.
Watch out for
The utility row is not part of the collapsing menu. In narrow containers the main row folds into a menu button while the top row stays, so a long note and three links can crowd a phone screen.
Pairs well with
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 |
|---|---|---|---|
brand | string | 'Brand name' | Text, up to 40 characters. |
wordmark | Media | - | Optional; empty is not rendered. |
brandHref | string | - | Text, up to 300 characters. Optional; empty is not rendered. |
note | string | 'Say when people can reach you.' | Text, up to 80 characters. Optional; empty is not rendered. |
utility | Link[] | 3 items | List of up to 3. Optional; empty is not rendered. |
links | Link[] | 4 items | List of up to 10. |
current | string | - | Text, up to 300 characters. Optional; empty is not rendered. |
cta | Link | {…} | See the type. |
ctaInMenu | boolean | - | Optional; empty is not rendered. |