Description list
Label and value pairs, like the details of a record.
SourceStyles source@monoline/react 0.5.0Markdown for AI toolsstable
- Built on native elements
- A native dl with dt and dd, so assistive tech pairs each label with its value.
- Styles in one file:
description-list.css
Import
import '@monoline/css';
import {DescriptionList} from '@monoline/react';
Not installed yet? Pick a route.
Copies the source and its styles into your project.
npx monoline add description-list
Usage
import {DescriptionList} from '@monoline/react';
<DescriptionList
items={[{term: 'Plan', details: 'Pro'}, {term: 'Seats', details: '12'}, {term: 'Renews', details: '1 March 2027'}]}
/>
Examples
Account
Props
DescriptionListProps
| Prop | Type | Default | Description |
|---|---|---|---|
items required | DescriptionItem[] | – | The term and details pairs to show, in order. |
layout | "inline" | "stacked" | 'inline' | `stacked` puts each term above its value; `inline` puts them side by side. |
Data Attributes
State is exposed through attributes. Style it with these selectors, not with class toggles.
This component sets no state attributes.
CSS classes
| Class | Stylesheet |
|---|---|
.dlist | description-list.css |
.dlist-row | description-list.css |
.dlist-stacked | description-list.css |
Customization
Style it with the kit's tokens in your own CSS, loaded after @monoline/css. Prefer the attributes above over extra classes. See Theming for every token.
app.css
.dlist {
border-color: var(--accent);
}
Accessibility
- A native dl with dt and dd, so assistive tech pairs each label with its value.