Skip to content
Klarhimmel UI

Content, policy document

Content, policy document previewContent, policy document preview

Install

npx shadcn add @klarhimmel/content-legal
DetailsAbout, usage, props and more

A policy or terms page: title and last-updated line, a sticky contents list that jumps to numbered sections (plain anchors, no script), and the sections themselves.

Import

Import

import Block from '@/components/klarhimmel/blocks/content-legal';
Also called
  • content/legal
Category
Long-form text and timelines for about and policy pages. New project? Set it up once: /get-started/installation.

Notes

When to use it

A policy or terms page with a sticky contents list that jumps to numbered sections. For an ordinary article or about page without the contents list, content-prose is the simpler choice.

Writing for it

- Section titles are required and hold 80 characters. They become both the contents entries and the numbered h2 headings, so write them to make sense in a short list. - Each body holds 1200 characters in a single block of text, so split a long clause into its own section instead of cramming it in. - Fill the updated line (60 characters) with the date as the reader should see it, such as 'Last updated 3 March 2026'. The contents label (40 characters) is the small caption over the list.

Watch out for

The page title is drawn as the h1 here, not an h2, because a policy page usually has no hero. If a hero above it already carries the h1, set the headingLevel of this block to 2 so the page has only one.

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 ContentLegal from '@/components/klarhimmel/blocks/content-legal';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContentLegal props={{
          "eyebrow": "Name the kind",
          "title": "Name the document",
          "updated": "Last updated 0 Month 0000",
          "intro": "Say what this document covers, who it is for and how it is meant to be read. Keep it plain and short.",
          "contentsLabel": "On this page",
          "sections": [
            {
              "title": "Name the first topic",
              "body": "Say what is collected or covered under the first topic, in two sentences or so. Name the things that are never collected or stored."
            },
            {
              "title": "Name the second topic",
              "body": "Say why it is collected or covered, and which rules require it, in one or two sentences."
            },
            {
              "title": "Name the third topic",
              "body": "Say how long each kind of thing is kept, what the rules say about it and when it is deleted."
            },
            {
              "title": "Name the fourth topic",
              "body": "Say who else sees it, where they are based and what binds them. Name what is never sold or shared."
            },
            {
              "title": "Name the fifth",
              "body": "Say what the reader can ask for, where to write and how quickly you answer. Keep it short and clear."
            }
          ]
        }} />
      </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
eyebrowstring'Name the kind'Text, up to 60 characters.
titlestring'Name the document'Text, up to 100 characters.
updatedstring'Last updated 0 Month 0000'Text, up to 60 characters.
introstring'Say what this document covers, who …'Text, up to 500 characters.
contentsLabelstring'On this page'Text, up to 40 characters.
sections{ title, body }[]5 itemsList of 2 to 8. Each item: title, body.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.