Playground

Description list

Label and value pairs, like the details of a record.

  • 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

PropTypeDefaultDescription
items requiredDescriptionItem[]–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

ClassStylesheet
.dlistdescription-list.css
.dlist-rowdescription-list.css
.dlist-stackeddescription-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.