# Report, key figures

- **[Sections](/blocks/)**
- **[Report](/blocks/report/)**
- **Report, key figures**

Two to six figures at a glance: a value, what it counts, an optional note and a direction (up, down, flat).

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/report-stats
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/report-stats';
  ```

Also called

- report/stats

- **Category**: A document for a reader: key figures, decisions with a recommended default, long-cell tables, timelines, callouts, sources and prose. Rendered to one HTML file by kh-report. New project? Set it up once: /get-started/installation.

## Notes

- **When to use it**: Two to six key figures at a glance in a report, each with an optional note and a direction. For figures on a marketing page use `stats-cards`, and when the numbers need a row-by-row comparison use `report-table`.
- **Writing for it**: - The value allows only 24 characters, so write 42 %, 3.1 s or 12 000 and move units and context into the label (60 characters).
- Use trend only when direction is the point. Up, down and flat add an arrow and a screen-reader word but do not say whether the change is good, so say that in note (100 characters).
- You need at least two items and at most six. Three, five and six figures lay out in threes on wide containers, while two and four lay out in twos.
- **Watch out for**: A figure needs two or more items, and the value box wraps anywhere, so a long value still breaks mid-word instead of overflowing. Keep it short anyway, because a trend arrow is placed after it and the screen reader hears the label before the value.

## Pairs well with

- **[Report, header](/blocks/report/header)**
- **[Report, prose](/blocks/report/prose)**
- **[Report, table](/blocks/report/table)**

## 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 ReportStats from '@/components/klarhimmel/blocks/report-stats';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ReportStats props={{
          "title": "Name the figures",
          "lead": "",
          "items": [
            {
              "value": "00",
              "label": "Name count 1",
              "note": ""
            },
            {
              "value": "00",
              "label": "Name count 2",
              "note": "Say a short note",
              "trend": "up"
            },
            {
              "value": "00",
              "label": "Name count 3",
              "note": "Say a short note",
              "trend": "flat"
            },
            {
              "value": "00",
              "label": "Name count 4",
              "note": "Say a short note",
              "trend": "down"
            }
          ]
        }} />
      </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.

- **title**: Text, up to 100 characters.
- **lead**: Text, up to 300 characters.
- **items**: List of 2 to 6. Each item: value, label, note, trend ('up' | 'down' | 'flat') (optional).
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/report/sources)

[Next](/blocks/report/steps)
