Directory, header


Install
npx shadcn add @klarhimmel/directory-headerDetailsAbout, usage, props and more
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
Import
- 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
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 |
|---|---|---|---|
breadcrumbs | Link[] | 0 items | List of up to 4. |
eyebrow | string | 'Name the section' | Text, up to 60 characters. |
title | string | 'Name the page' | Text, up to 80 characters. |
description | string | 'Say in one or two sentences what th…' | Text, up to 300 characters. |
search | { placeholder } | {…} | Fields: placeholder. |
selects | string[] | 2 items | List of up to 3. |
chips | string[] | 6 items | List of up to 12. |
active | string | 'Filter one' | Text, up to 30 characters. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |