Description list
A React component in Beamline's Content & display category.
The details of one record as label and value pairs: beside each other or stacked, in as many columns as the room holds; a copy button arrives on the row you point at, long values fold behind Show more, a value that changes lights once, and a value never recorded is hatched, never blank or zero.
Use it for
- The fields of one record on its page or in a side panel: a customer, an invoice, an API key, a deployment, an order.
- Settings or metadata read more than edited, with ids people copy.
Not for
- Many records with the same fields (table or data-grid).
- Editing several fields at once (a form).
- A few headline numbers with trends (metric-card).
Anatomy
- root (a dl; optional title, description and actions above it)
- row: label (with an optional hint glyph and tooltip) and value
- copy button at the row's end, arriving with attention
- unmeasured value: a hatched chip saying “Not recorded”
- Show more / Show less under a long value
Variants
- 0: orientation: horizontal (label beside value; stacks by itself under 24rem) · vertical (label above value)
- 1: columns: auto (as many as fit at 20rem each) · 1 · 2 · 3
- 2: density: compact · default · comfortable
- 3: divided: hairlines between rows (default) or none
- 4: per item: mono (ids, keys, hashes), wide (takes the whole row), copy, hint
States
- loading (label and value skeletons in the same rows)
- not recorded (null or undefined value: hatched, read as “not recorded”)
- long value folded (clamped to `clamp` lines) and opened
- copied (the row's button says Copied)
- changed (a value that differs from the last render lights once)
Keyboard
- Tab reaches each copy button, hint and Show more in reading order; values with their own controls keep them
- The copy button is laid out at rest, so focus never lands on something that moves
Motion
A copy button arrives with the row's hover or focus (the shared reveal: in at once, out over the departure). A value that changes lights with the accent tint and fades over three standard durations. Show more eases the value's height open and closed (the shared height morph). Reduced motion keeps the tint as a still mark for a moment and opens at once.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items (required) | DescriptionItem[] | — | { label, value, key?, copy?, hint?, mono?, wide? }; value is any node; null or undefined reads as not recorded. |
orientation | "horizontal" | "vertical" | — | Label beside or above its value. Default horizontal. |
columns | "auto" | 1 | 2 | 3 | — | Default auto: as many as the room holds at 20rem each. |
density | "compact" | "default" | "comfortable" | — | Row padding. |
divided | boolean | — | Hairlines between rows. Default true. |
clamp | number | — | Lines a long text value shows before Show more. Default 3. |
unmeasuredLabel | string | — | What a missing value says. Default "Not recorded". |
title / description / actions | ReactNode | — | An optional heading row above the list. |
loading | boolean | — | Skeleton rows: the labels you passed stay, values wait. |
className / classNames / style / ref | string / DescriptionListClassNames / CSSProperties / Ref<HTMLDivElement> | — | The root and its parts (header, list, item, label, value, copy, more). |
Dependencies
lucide-react
Import
import { DescriptionList } from "@/components/description-list/description-list";
Get it
Description list is part of Beamline: 200+ components and 50+ complete screens for React that your coding agent (Claude Code, Codex, Cursor or any MCP client) installs into your app through Beamline's MCP server, as a ready-built package or as plain React source you can change. $49 launch price, one payment, no subscription, lifetime updates, one licence for your whole team. Get Beamline · Connect your agent
More in Content & display
- Image compare: Two images in one frame with a divider: drag anywhere, or arrow keys on the handle; horizontal or vertical, with captions.
- Live cursors: Who else is working on this, and where: over any shared surface, each person's pointer in the colour their name always gets, with a name flag, gliding…
- Video player: A video player on the native <video> element: title bar with an external link and close, centre play with ±10 s, scrub, time, volume, speed, captions…
- Lightbox: A full-screen image viewer: a thumbnail grows into it and shrinks back, arrows and ←/→ step through the set, Esc or a downward drag closes it.
- File diff: A change to one file as a unified diff: line numbers, tinted lines, only the changed words marked, long unchanged stretches folded; give rows or just…
- QR Code: A scannable code set as gradient dots with rounded finder rings and an optional centre mark; a new value ripples out from the centre.
- Slot text: Text and numbers that roll into their new value on reels, digit by digit from the right; other characters fade. Read as plain text by assistive tech.
- Text reveal: A headline whose words rise into place once, the first time it scrolls into view; never repeats.
- Text morph: A short label that becomes its next state letter by letter: shared letters glide into place, new ones arrive, old ones leave.
- Code block: Code to read and copy: highlighted in the system's colours, numbered, marked lines, long files folded behind “Show all”.
- Inbox list: Conversations waiting for a person, triaged in place: sender, subject and the first words, time, unread weight, star, labels and attachments, grouped by…
- Comment thread: A discussion attached to something: replies, reactions, @mentions, editing and deleting your own, resolve that folds the thread.
- Timeline: What happened, newest first and grouped by day: people with avatars, systems with toned icons, relative times with the exact time on hover, details in…
- Text shimmer: Ongoing work said in words (“Thinking…”) with a calm band of light passing across them; stops when inactive.
- Logo Carousel: A wall of logos shown a few at a time: every few seconds the slots turn left to right, each logo leaving upward as the next rises in.
- Avatar group: A team in a small space: overlapping faces that name themselves on hover or focus, and “+N” naming the rest.
- Avatar: A person or account in a small space: a photo, or initials on the hue their name always gets; presence dot; circle for people, square for companies.
- Item: The generic list row: media, title, description, meta and trailing actions; becomes a link or button when interactive.
- Marker: A labelled point in a stream: a status event with an icon between messages, or a label such as "Today" between two hairlines.
- Credit: "Designed with Beamline" for a site's footer: the Beamline mark and a quiet line, or a small badge. With your referral code, a team's first purchase…
- Badge: A short status, category or count label: six tones, an icon or a status dot, two sizes.
- Kbd: Keyboard keys as keycaps, for combinations and sequences (G then A); `mod` resolves to ⌘ or Ctrl per platform, symbols are spoken as words.