DescriptionList

Data display

Names and their values, the detail view of a record: a <dl>. Given items ({ term, details }), <DescriptionList.Root items={โ€ฆ} /> draws them. Composed, each DescriptionList.Item holds a DescriptionList.Term and its DescriptionList.Details, which can hold anything: a Badge, a link, a Button. orientation: terms beside the values in two aligned columns (horizontal, the default) or above them (vertical).

import { DescriptionList } from '@limerdev/zest';
DescriptionList for AI tools (llms.txt)
Use for
The facts of one record: a customer's details, an invoice's status and dates, a user's settings summary.
Don't
Many records with the same fields: use Table. Values the user edits: use a form of Fields.

Examples

A record

An invoice's facts: terms beside their values, which can be any content.

Customer
Acme AB
Status
Paid
Amount
48 200 kr
Due
12 January 2027

Items vertical

Given items, the list draws them; vertical puts each term above its value, for a narrow space.

Organisation number
556677-8899
Contact
Maja Lind
Payment terms
30 days

Props

Every part also takes class (merged over its defaults), ref (bindable: the element), children, and child (a snippet that renders your own element, with props to spread on it).

DescriptionList.Root

Prop Type Default Description
items DescriptionListEntry[] [] The names and values, drawn when the list has no children.
orientation "horizontal" | "vertical" 'horizontal' Terms beside their values in two columns (horizontal), or above them (vertical, for a narrow space).

DescriptionList.Item

No props of its own beyond the common ones.

DescriptionList.Term

No props of its own beyond the common ones.

DescriptionList.Details

No props of its own beyond the common ones.