Skip to content
Klarhimmel UI

Snapshot, profile

Snapshot, profile previewSnapshot, profile preview

Install

npx shadcn add @klarhimmel/snapshot-profile
DetailsAbout, usage, props and more

A compact card shown first in a snapshot: the site's name, what it does in a few sentences, and its trade, region and language when known.

Import

Import

import Block from '@/components/klarhimmel/blocks/snapshot-profile';
Also called
  • snapshot/profile
About
A compact card shown first in a snapshot: the site's name, what it does in a few sentences, and its trade, region and language when known. Text only (the data is read from a crawl); an empty field is left out.
Category
The live snapshot of a site: progress narration, the profile, one card per research module and the numbered sources behind it. Rendered in a page island that re-renders on each poll. New project? Set it up once: /get-started/installation.

Notes

When to use it

The compact card that opens a snapshot: the site's name, a short account of what it does, and its trade, region and language. Put it before the snapshot-module cards, and use snapshot-progress ahead of it while the research is still being read.

Writing for it

- The name is required (120 characters) and is the card's h2. Use the name the crawl found, since the card reports what was read rather than what the customer calls itself. - Summary holds 800 characters of plain text with no formatting. Two or three sentences on what the site sells and to whom is enough. - Trade and region hold 120 characters and language 40. Leave a fact out when it is not known; the labels in front can be translated through the words field.

Watch out for

Empty trade, region and language are left out of the list entirely, so an unknown value never reads as a blank. The summary is plain text, so bold and links typed into it are shown as typed.

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 SnapshotProfile from '@/components/klarhimmel/blocks/snapshot-profile';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <SnapshotProfile props={{
          "name": "Name the site",
          "summary": "Say in two or three sentences what the site is and does, who it serves, and what it offers.",
          "trade": "Name the trade",
          "region": "Name the region",
          "language": "Name language",
          "words": {
            "trade": "Trade",
            "region": "Region",
            "language": "Language"
          }
        }} />
      </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
namestring'Name the site'Text, up to 120 characters.
summarystring'Say in two or three sentences what …'Text, up to 800 characters.
tradestring'Name the trade'Text, up to 120 characters.
regionstring'Name the region'Text, up to 120 characters.
languagestring'Name language'Text, up to 40 characters.
words{ trade, region, language }{…}Fields: trade (optional), region (optional), language (optional). Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.