# Directory, header

- **[Sections](/blocks/)**
- **[Directory](/blocks/directory/)**
- **Directory, header**

Title and description of a catalogue page, with optional breadcrumbs, search field, select labels and filter chips. Presentation only: the site wires search and sort.

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/directory-header
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/directory-header';
  ```

Also called

- directory/header

- **Category**: Catalogue pages: headers with filters, card grids, full-width previews. New project? Set it up once: /get-started/installation.

## Notes

- **When to use it**: Opens a catalogue page with a title, description and optional search field, select buttons and filter chips. It is presentation only; for the single item page use `directory-preview`.
- **Writing for it**: - The title is the page h1 and holds 80 characters. The description holds 300 and should say what the catalogue contains and how to browse it.
- Chips hold 30 characters, up to 12. Whichever chip text matches the active field exactly is drawn as selected, so copy the same string into both.
- Search takes a placeholder of 60 characters, and up to 3 select labels of 40 characters each, such as Sort by.
- **Watch out for**: The search field and selects do nothing on their own; the site has to wire them. Clearing the search placeholder removes the search field, and the active chip is a text match, not an index.

## Pairs well with

- **[Directory, cards](/blocks/directory/cards)**
- **[Footer, columns](/blocks/footer/link-columns)**
- **[Navbar, simple](/blocks/navigation/simple)**

## 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 DirectoryHeader from '@/components/klarhimmel/blocks/directory-header';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <DirectoryHeader props={{
          "breadcrumbs": [],
          "eyebrow": "Name the section",
          "title": "Name the page",
          "description": "Say in one or two sentences what the page lists and how a reader can narrow it.",
          "search": {
            "placeholder": "Say what to search by"
          },
          "selects": [
            "Name the first filter",
            "Name a sort order"
          ],
          "chips": [
            "Filter one",
            "Filter two",
            "Filter three",
            "Filter four",
            "Filter five",
            "Filter six"
          ],
          "active": "Filter one"
        }} />
      </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.

- **breadcrumbs**: List of up to 4.
- **eyebrow**: Text, up to 60 characters.
- **title**: Text, up to 80 characters.
- **description**: Text, up to 300 characters.
- **search**: Fields: placeholder.
- **selects**: List of up to 3.
- **chips**: List of up to 12.
- **active**: Text, up to 30 characters.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/directory/cards)

[Next](/blocks/directory/preview)
