Skip to content
Klarhimmel UI

Review, summary

Review, summary previewReview, summary preview

Install

npx shadcn add @klarhimmel/review-summary
DetailsAbout, usage, props and more

The front of a site review: which site, when, how many pages were read, the verdict in a few plain sentences, up to five findings with a severity said in words and the…

Import

Import

import Block from '@/components/klarhimmel/blocks/review-summary';
Also called
  • review/summary
About
The front of a site review: which site, when, how many pages were read, the verdict in a few plain sentences, up to five findings with a severity said in words and the page each is about, what we would build, and two actions (go ahead…
Category
A site review for a customer: the verdict with findings, and a note per page with what to keep, change, add or remove. New project? Set it up once: /get-started/installation.

Notes

When to use it

The front of a site review: the site, the verdict, up to five findings with a severity, what we would build, and two buttons. Use review-page-note after it for the page-by-page detail.

Writing for it

- The verdict holds 600 characters, so give two to four plain sentences. It is set large in an accent box and is the part most readers will actually read. - Findings are limited to five, each with a required title (100 characters), a detail (400) and a severity of high, medium, low or good. Order them with the worst first, since the list is shown in the order given. - Fill noFindings (120 characters) when the review found nothing. Without it, an empty findings list leaves the heading and the list out completely.

Watch out for

Like the page note it is strict, and invalid props give a notice rather than sample copy. The goAhead and question buttons are always drawn, so give both a real label and address.

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 ReviewSummary from '@/components/klarhimmel/blocks/review-summary';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ReviewSummary props={{
          "eyebrow": "Name the topic",
          "siteName": "Name the business",
          "siteUrl": "https://exempel.example",
          "reviewedOn": "1 January 0000",
          "pagesRead": "00 pages read",
          "verdictTitle": "Name the verdict",
          "verdict": "Say in two or three sentences what the site does well, then name the few things…",
          "findingsTitle": "Name the findings",
          "severityWords": {
            "high": "Most urgent",
            "medium": "Less urgent",
            "low": "Optional",
            "good": "Going well"
          },
          "findings": [
            {
              "title": "Say what the finding is, as a short title",
              "detail": "Say what a visitor runs into on the page, why it matters, and what one change w…",
              "severity": "high",
              "page": "Name a page",
              "pageHref": ""
            }
          ],
          "noFindings": "Say that nothing was found",
          "buildTitle": "Name what you would build",
          "build": "Say in two sentences what you would build for them, how long it takes, and what…",
          "buildPoints": [
            "Name a first thing you would build"
          ],
          "goAhead": {
            "label": "Main action",
            "href": "#go-ahead"
          },
          "question": {
            "label": "Second action",
            "href": "#question"
          },
          "note": "Say what happens next and what waits for them"
        }} />
      </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 topic'Text, up to 60 characters.
siteNamestring'Name the business'Text, up to 80 characters.
siteUrlstring'https://exempel.example'Text, up to 200 characters.
reviewedOnstring'1 January 0000'Text, up to 40 characters.
pagesReadstring'00 pages read'Text, up to 40 characters.
verdictTitlestring'Name the verdict'Text, up to 60 characters.
verdictstring'Say in two or three sentences what …'Text, up to 600 characters.
findingsTitlestring'Name the findings'Text, up to 60 characters.
severityWords{ high, medium, low, good }{…}Fields: high, medium, low, good.
findings{ title, detail, severity, page, pageHref }[]4 itemsList of up to 5. Each item: title, detail, severity ('high' | 'medium' | 'low' | 'good' | ''), page, pageHref.
noFindingsstring'Say that nothing was found'Text, up to 120 characters.
buildTitlestring'Name what you would build'Text, up to 60 characters.
buildstring'Say in two sentences what you would…'Text, up to 600 characters.
buildPointsstring[]4 itemsList of up to 5.
goAheadLink{…}See the type.
questionLink{…}See the type.
notestring'Say what happens next and what wait…'Text, up to 200 characters.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.