01
Overview
Reference usage
Semantic dl/dt/dd list for term–description pairs such as metadata or attributes.
Usage
The two-column variant sets a muted term on the left and the value on the right, with no row dividers.
Formatted values
A definition can be a value the list formats, so every list shows timestamps, IDs and tags the same way:
{ type: 'timestamp', value }: a readable date and time, with the exact time (full date, seconds and zone) on hover.{ type: 'identifier', value }: an ID or hash, shortened and set in small monospace, with an icon-only copy button that copies the whole value.{ type: 'tags', tags, systemTagCount, onAddTag }: read-only tags, with system tags counted instead of listed and an Add a tag action that callsonAddTag.
- Component
- DescriptionList
- Status
- Stable
- Version
- 1.0.0
- License
- MIT
- Maintainer
- Cinder team
02
When to use
Use when
- Summarizing the properties of one record such as a user profile or order detail.
- Switching between stacked and inline term layouts via the variant prop.
Avoid when
- Iterating over a homogenous collection of records — use data-list or table instead.
03
Examples
Description list
Key–value metadata pairs in the default stacked layout.
Description list rich definitions
Definitions can render rich snippet content when plain text is not enough.
Description list variants
Striped and two-column layout variants.
04
Props
Name | Type | Default | Description |
|---|---|---|---|
items required | DescriptionListItem[] | ||
variant | 'default' | 'striped' | 'two-column' | 'narrow' | 'default' | Controls the visual layout:
- default: stacked rows with visible terms.
- striped: alternating row backgrounds.
- two-column: a muted term on the left and the value on the right, with no row dividers;
collapses to stacked at narrow widths.
- narrow: <dt> is visually hidden via .cinder-sr-only. Only appropriate when
surrounding context already labels the value. NOT a general compact mode. |
stack | boolean | false | Puts every term above its value at any width. The two-column variant
already stacks once its own container is narrower than 28rem; stack
stacks it regardless, for a list whose page has already chosen its phone
layout. Has no effect on narrow, whose terms stay visually hidden. |
actions | snippet | Optional snippet rendered once per row. Receives the full DescriptionListItem so
consumers can build disambiguated aria-label strings (e.g. aria-label="Edit ${item.term}").
Any interactive element in actions MUST set an unambiguous aria-label. |