Skip to content
Klarhimmel UI

Directory, template info

Directory, template info previewDirectory, template info preview

Install

npx shadcn add @klarhimmel/directory-template-info
DetailsAbout, usage, props and more

What a template contains: the pages it includes (name and path), the blocks it uses as chips, and a paragraph on how to customise it.

Import

Import

import Block from '@/components/klarhimmel/blocks/directory-template-info';
Also called
  • directory/template-info
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

A three-part panel that says what a template contains: its pages, the blocks it uses and how to customise it. Put it under directory-preview on a template page.

Writing for it

- List 1 to 10 pages with a name of 40 characters and a path of 80. Write the path as a reader would see it, such as /pricing. - Blocks are chips of 60 characters, up to 16. Use the block ids so a reader can search for them. - The customise paragraph holds 400 characters. Say which files or settings to edit first, and give each of the three section titles 40 characters or less.

Watch out for

This block has no shared heading; each of the three columns has its own h2, and the section is labelled Template details. If the blocks list is empty the column keeps its heading with nothing under it.

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 DirectoryTemplateInfo from '@/components/klarhimmel/blocks/directory-template-info';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <DirectoryTemplateInfo props={{
          "pagesTitle": "Name the page list",
          "pages": [
            {
              "name": "First page",
              "path": "/"
            },
            {
              "name": "Second page",
              "path": "/services"
            },
            {
              "name": "Third page",
              "path": "/work/example"
            },
            {
              "name": "Fourth page",
              "path": "/pricing"
            },
            {
              "name": "Fifth page",
              "path": "/contact"
            }
          ],
          "blocksTitle": "Name the blocks",
          "blocks": [
            "header/simple",
            "hero/split",
            "logo-cloud/row",
            "features/grid",
            "case-study/before-after",
            "pricing/tiers",
            "faq/accordion",
            "contact/form",
            "footer/link-columns"
          ],
          "customizeTitle": "Name the how-to",
          "customize": "Say in two or three sentences how the reader makes it their own, and where the content and styles live."
        }} />
      </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.

PropTypeDefaultDescription
pagesTitlestring'Name the page list'Text, up to 40 characters.
pages{ name, path }[]5 itemsList of 1 to 10. Each item: name, path.
blocksTitlestring'Name the blocks'Text, up to 40 characters.
blocksstring[]9 itemsList of up to 16.
customizeTitlestring'Name the how-to'Text, up to 40 characters.
customizestring'Say in two or three sentences how t…'Text, up to 400 characters.