# Navbar, sidebar

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

Navigation as a left column: the brand on top, stacked links and a button at the bottom, with an optional heading and lead in the content beside it.

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/navbar-sidebar
  ```
- **Import**

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

Also called

- navigation/sidebar
- header/sidebar

- **About**: Navigation as a left column: the brand on top, stacked links and a button at the bottom, with an optional heading and lead in the content beside it.
- **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 or docs style page where the navigation is a left column beside the content: brand on top, stacked links, a button at the bottom. Turn the top bar on for a dashboard feel with search and an account chip above. For a bar across the top with links in a row use `navbar-simple`; for a shop header with categories use `navbar-search`.
- **Writing for it**: - The brand holds 40 characters, a link label 40, and one to eight links fit the column.
- The title holds 80 characters and the lead 240; both are optional and the content area draws only what is set.
- The search label holds 60 and the initials 3; with the top bar on, clear the column button and use the two actions in the content instead.
- **Watch out for**: The column is tall, so put this block first on a page and give it content of its own; below it, other sections lose the left edge. Keep link labels short, or the column grows wider than its 18rem slot and wraps.

## Pairs well with

- **[Hero, split](/blocks/hero/split)**
- **[Features, grid](/blocks/features/grid)**
- **[FAQ, list](/blocks/faq/accordion)**

## 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 NavbarSidebar from '@/components/klarhimmel/blocks/navbar-sidebar';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <NavbarSidebar props={{
          "brand": "Write the business name",
          "topBar": "none",
          "links": [
            {
              "label": "Name the first page",
              "href": "#first"
            },
            {
              "label": "Name the second page",
              "href": "#second"
            },
            {
              "label": "Name the third page",
              "href": "#third"
            }
          ],
          "linksLabel": "Name the link column",
          "cta": {
            "label": "Main action",
            "href": "#start"
          },
          "eyebrow": "",
          "title": "Say what this page is about",
          "description": "Say in one or two sentences what the visitor can do on this page."
        }} />
      </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.
- **mark**: Fields: paths (optional), viewBox (optional), src (optional). Optional; empty is not rendered.
- **brandHref**: Text, up to 300 characters. Optional; empty is not rendered.
- **topBar**: One of 'none', 'search'. Optional; empty is not rendered.
- **links**: List of 1 to 8.
- **linksLabel**: Text, up to 60 characters.
- **cta**: Optional; empty is not rendered.
- **search**: Fields: label (optional), placeholder (optional), href (optional). Optional; empty is not rendered.
- **profile**: Fields: name (optional), initials (optional), href (optional). Optional; empty is not rendered.
- **eyebrow**: Text, up to 60 characters.
- **title**: Text, up to 80 characters.
- **description**: Text, up to 240 characters.
- **primary**: Optional; empty is not rendered.
- **secondary**: Optional; empty is not rendered.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/navigation/search)

[Next](/blocks/navigation/simple)
