Description List
A semantically correct description list built on the HTML <dl> element. Renders a list of label/value pairs, commonly used in detail views to display metadata about a resource.
Compose <DescriptionList.Root> with <DescriptionList.Item>, <DescriptionList.Label>, and <DescriptionList.Value> as direct children.
Composition
Compose the parts of a DescriptionList together to build your own:
Polymorphism
DescriptionList.Root, DescriptionList.Item, DescriptionList.Label, and DescriptionList.Value each accept an asChild prop. When true, the part renders its single child instead of its default element (<dl>, <div>, <dt>, <dd>), forwarding all class names, data-* attributes, and the ref onto that child.
Actions in a row
To put a copy button or another action beside a value, use an IconButton with size="2xs". Its 20px box fits inside the line of text, so a row with an action is the same height as a row without one. Wrap the value text in its own element beside the button.
Long values
The value column has a 0 minimum width, so a long value stays inside its row instead of widening the list. Set the overflow behavior on DescriptionList.Value or on a child: truncate clips a single line with an ellipsis, and wrap-anywhere breaks a line at any character. DescriptionList.Value does not need min-w-0.
When the end of the value is the part that matters, as in a URL or an ID, render it with TruncatedText: the head clips and the tail stays visible.
Content that cannot shrink and has no scroll container of its own (a wide table, a pre) overflows its cell. DescriptionList.Root scrolls to reveal it. Give that content overflow-x-auto to scroll it inside the row instead.
API Reference
DescriptionList.Root
The root container for a description list. Renders a <dl> element. The value column has a 0 minimum width, so a value that truncates or wraps stays inside the row instead of widening the list.
All props from dl, plus:
Every part stamps a data-slot. A data-slot passed to DescriptionList.Root joins in front of its own value instead of replacing it.
DescriptionList.Item
A wrapper that groups a DescriptionList.Label and DescriptionList.Value pair. Renders a <div> with a default subgrid layout that inherits column tracks from the root.
All props from div, plus:
DescriptionList.Label
The label for a description list item. Renders a <dt> element.
All props from dt, plus:
DescriptionList.Value
The value for a description list item. Renders a <dd> element. Compose any content inside — the component imposes no layout on its children.
All props from dd, plus: