# Navbar, utility bar

- **[Sections](/blocks/)**
- **[Navigation](/blocks/navigation/)**
- **Navbar, utility bar**

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

- **CLI**

  ```
  npx shadcn add https://ui.klarhimmel.com/r/navbar-utility.json
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/navbar-utility';
  ```

Also called

- 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

- **[Hero, split](/blocks/hero/split)**
- **[Hero, framed screenshot](/blocks/hero/frame)**
- **[CTA, offer](/blocks/cta/offer)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import NavbarUtility from '@/components/klarhimmel/blocks/navbar-utility';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <NavbarUtility props={{
          "brand": "Brand name",
          "note": "Say when people can reach you.",
          "utility": [
            {
              "label": "00 000 000 00",
              "href": "tel:+46310000000"
            },
            {
              "label": "Language",
              "href": "/sv"
            },
            {
              "label": "Your account",
              "href": "/booking"
            }
          ],
          "links": [
            {
              "label": "First page",
              "href": "#rooms"
            },
            {
              "label": "Second page",
              "href": "#breakfast"
            },
            {
              "label": "Third page",
              "href": "#offers"
            },
            {
              "label": "Fourth page",
              "href": "#directions"
            }
          ],
          "cta": {
            "label": "Main action",
            "href": "#book"
          }
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

## 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.

- **brand**: Text, up to 40 characters.
- **wordmark**: Optional; empty is not rendered.
- **brandHref**: Text, up to 300 characters. Optional; empty is not rendered.
- **note**: Text, up to 80 characters. Optional; empty is not rendered.
- **utility**: List of up to 3. Optional; empty is not rendered.
- **links**: List of up to 10.
- **current**: Text, up to 300 characters. Optional; empty is not rendered.
- **cta**: See the type.
- **ctaInMenu**: Optional; empty is not rendered.

[Previous](/blocks/navigation/simple)

[Next](/blocks/banner/announcement)
