Navbar, open utility strip


Install
npx shadcn add @klarhimmel/navbar-utility-openDetailsAbout, usage, props and more
Two rows with every link open at every width: a plain top strip with up to three text links, a search field and one social icon, above the main row with the brand, the…
Import
Import
- navigation/utility-open
- header/utility-open
- About
- Two rows with every link open at every width: a plain top strip with up to three text links, a search field and one social icon, above the main row with the brand, the links centred 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
Pick it for a site whose few links should always be visible: a plain top strip with quiet links, a search field and one social icon, above a main row with the brand, centred links and one button. On a phone both rows stay and the links wrap, with no menu. Pick navbar-utility for a tinted strip with a note and a menu on a phone, and navbar-search for a shop header with a wide search and a category row.
Writing for it
- Brand up to 40 characters, up to three strip links and one icon label of 60 characters. - Main links 1 to 8, each label up to 40 characters; keep them short so they fit one line at 390. - Search label up to 60 characters names the field for screen readers; its placeholder up to 40.
Watch out for
Eight long links wrap into three or four lines on a phone and push the button down; keep labels to one or two words, and drop the strip search when the site has no search page to send it to.
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. |
brandHref | string | - | Text, up to 300 characters. Optional; empty is not rendered. |
topLinks | Link[] | 2 items | List of up to 3. Optional; empty is not rendered. |
search | { label, placeholder, action } | {…} | Fields: label, placeholder, action (optional). Optional; empty is not rendered. |
social | { icon, label, href } | {…} | Fields: 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'), label, href. Optional; empty is not rendered. |
links | Link[] | 3 items | List of 1 to 8. |
cta | Link | {…} | See the type. |