Skip to content
Eskais UI

Data

Description List

Terms and their details in a dl: stacked, inline (side by side, stacked again in a narrow container) or a grid of columns. Spacing from the role tokens, copyable details with an agent copy action, and a dash for an empty value that screen readers read as an overridable label.

Example

Status
Live
Region
eu-west-1
Commit
9f2c4e1
Owner
Not set

Installation

npx shadcn@latest add @eskais/description-list
npm packagesclass-variance-authority@0.7.1lucide-react

Usage

Import
import { descriptionValue } from "@/components/ui/description-list-primitive"import {  DescriptionDetails,  DescriptionItem,  DescriptionList,  descriptionListLabels,  DescriptionTerm,} from "@/components/ui/description-list"

Reach for it for an entity's properties: a deployment's region and commit, a task's owner and dates. Pick inline for a panel, grid for a summary page.

API reference

DescriptionList

PropTypeDefault
layout`stacked` (default): each term above its details. `inline`: side by side, stacked in a narrow container. `grid`: items in columns."stacked" | "inline" | "grid""stacked"
columnsThe most columns `grid` uses; fewer while a column would get narrower than `--description-column-min` (12rem).number3
labelsPartial<DescriptionListLabels>–

Also takes <dl> attributes and render.

DescriptionItem

Takes <div> attributes and render.

DescriptionTerm

Takes <dt> attributes and render.

DescriptionDetails

PropTypeDefault
monoSets the value in the monospace face, for ids, hashes and keys.booleanfalse
copyableAdds a copy button, and a `copy` action for agents named by the term.booleanfalse
copyValueThe text to copy; defaults to the details when they are a string or a number.string–
onCopyDescriptionValueOptions["onCopy"]–

Also takes <dd> attributes and render.

Other exports

descriptionValuedescriptionListLabelstype DescriptionCopyDetailstype DescriptionValueOptionstype DescriptionDetailsPropstype DescriptionListLabelstype DescriptionListLayouttype DescriptionListProps

Accessibility

  • A real dl: screen readers announce a list of terms with their definitions.
  • An empty value shows a dash but reads a word (labels.empty), never silence.
  • The copy button announces Copied in a polite live region.

Agent actions

Agents find a copyable value by its term and call copy.

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.