DescriptionList
Key/value fact sheet: a label–value pair list like a spec sheet or detail card.
Props
DescriptionList extends HTMLAttributes<HTMLDivElement>.
| Prop | Type | Default | Description |
|---|---|---|---|
rows | DescriptionRow[] | — | Array of key/value row definitions. |
spacious | boolean | — | Roomier rows, for a review pane rather than a dense detail panel. WizardSummary is this list in that mode. |
DescriptionRow
| Prop | Type | Default | Description |
|---|---|---|---|
key | ReactNode | — | Label for the row. |
value | ReactNode | — | Value displayed next to the label. |
mono | boolean | — | Renders the value in monospace font. |
onClick | () => void | — | Makes the row clickable and shows hover styling. |
action | ReactNode | — | Content after the value. Remains separate from wrapped value text. |
Examples
Basic description list
With monospace values
Clickable rows
import { DescriptionList } from "@solarius/onset";
import type { DescriptionRow } from "@solarius/onset";