DescriptionList
A semantic list of key/value pairs (
<dl>, <dt>, <dd>) under an optional title — balances, order summaries,
transaction details. Keys and values accept any ReactNode.Data Display
When to use
Usage
Account summary
- Available balance
- R$ 1.250,00
- In orders
- R$ 300,00
- Total
- R$ 1.550,00
import { DescriptionList } from '@apollion-dsi/core/data-display/description-list';
<DescriptionList
title="Account summary"
contents={[
{ key: 'Available balance', value: 'R$ 1.250,00' },
{ key: 'Total', value: <strong>R$ 1.550,00</strong> },
]}
/>;Pass id on an item when the list reorders; it becomes the React key.
Variants
direction="column" stacks each value under its key, for long values (addresses, hashes). dividers draws a thin rule
under every row except the last.
Deposit details
- Network
- Bitcoin (BTC)
- Address
- bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq
<DescriptionList direction="column" dividers contents={rows} />Spacing
The host gap is the space between each key and its value (default medium in a row, micro in a column). The title
and the rows keep their own fixed rhythm. itemProps passes Flex and border props to every row and wins over
gap and dividers.
<DescriptionList direction="column" gap="micro" itemProps={{ py: 'xs' }} contents={rows} />Accessibility
- Pairs render as
<dt>/<dd>inside one<dl>, so screen readers announce terms and values together. - The
titleis bold text, not a heading. Add a heading above the list when it starts a page section.
Properties
Name
Type
Default
Description
colorstringnoneTheme token (`theme.colors`) used as `color`. Has lower precedence than
`contrast`: when both are provided, the contrast calculation wins.
Stays `string` (not the typed union): `color` is also an HTML attribute
(`<li color>`, etc.) and interfaces extending native props require
identical types on the name collision.
containmentstringnoneContainment marker for the `cq` channel: emits
`container-type` (+ `container-name` when the string form carries one,
e.g. `'inline-size card'`). Apply on the immediate wrapper of the
adapting component — NEVER on page-level shells.
contents *DescriptionListItem[]noneKey/value pairs displayed in the list.
direction"row""column"'row'Orientation of each pair.
dividersbooleanfalseDividers between rows: applies a thin `borderPosition="bottom"` to
every row **except the last** (divider semantics, not a frame).
`itemProps` remains uniform and can override any border prop.
itemPropsDescriptionListItemPropsnoneExtra `Flex` props applied to each row (key/value pair).
legibility"on-photo"noneReading-shadow preset for text over a photographic background
(`on-photo`). Replaces the inline `style={{ textShadow }}` in the
consumer (brasil_2030 radar, gap A3). Token emission is deferred until a
2nd consumer asks for the raw var (see backlog).
lineClampnumbernoneCaps the text at this many lines and ends the cut with an ellipsis.
The full string stays in the DOM.
pageShellbooleannoneCenters the element and caps the width at `theme.layout.pageMaxWidth`.
The page shell of a classic centered layout.
readablenumberbooleannoneMakes the `color` legible against the page surface: `true` = WCAG AA
(4.5), a number sets a custom floor. Ignored with `contrast`.
See the Layout Props concept page for the full semantics.
titleReactNodenoneOptional title rendered above the list.
transformstringnoneCSS `transform` value (e.g. `translate(-50%, -33px)`). Never leaks
to the DOM as an attribute.
Beyond the props above, every component accepts the layout props (spacing, color, flex/grid, sizing, border) — not repeated here.