Record header and key facts as label/value pairs: values edit in place and copy, empty facts become Add actions, outside changes wash the row and show their delta.
Plays in view · replayPlays in view · replay
Online store · 3 items
description-list, lively
Use it for the top of any record screen: an order, a contact, a supplier, a ticket, a payment. It holds the record header (title, status, key actions) and the facts people read most, as label/value pairs, with editing, copy and change feedback built in. For many records side by side, use a data table. For a form where every field is edited together, use text fields.
On first view the header and the facts rise in once, one stagger step apart. An editable value lifts its
quiet tile on hover and shows its pencil, then becomes its InlineEdit field in place; an editable fact
with no value reads Add {label} with its pencil always visible, so the gap in the record is its own
action. Copyable values carry a copy ball on hover, focus and touch.
When a value changes from outside (live data, a webhook, a teammate, an action elsewhere on the page), the
fact tells you: its row takes a brand-muted wash that rises, holds and fades in 1.3 s, the old text
drifts up as it fades, numbers roll, and a number shows its delta ("-€24.50") in a chip beside its label
for about 2.6 s. Your own inline saves never flash. Try it in the preview: Refund shipping changes the
Total from the header, and Tracking starts empty.
pnpm dlx shadcn@latest add @motionkit-pro/description-listnpx shadcn@latest add @motionkit-pro/description-listyarn dlx shadcn@latest add @motionkit-pro/description-listbunx --bun shadcn@latest add @motionkit-pro/description-listRequires a Pro license and the @motionkit-pro registry with your token. See Installation.
motion runs the animation. The edit field, the status badge and the copy ball are their own registry
items (inline-edit, status-badge, copy-button) and install with it.
import { DescriptionList } from "@/components/ui/description-list"
export function OrderDetail({ order }: { order: Order }) {
return (
<DescriptionList
columns={2}
onValueChange={(id, value) => api.updateOrder(order.id, { [id]: value })}
>
<DescriptionList.Header
title={`Order #${order.number}`}
status={{ label: "Paid", tone: "success" }}
actions={<Button variant="secondary">Refund</Button>}
/>
<DescriptionList.Item
id="customer"
label="Customer"
value={order.customer}
format="link"
href={order.customerUrl}
/>
<DescriptionList.Item id="email" label="Email" value={order.email} copyable />
<DescriptionList.Item id="placed" label="Placed" value={order.placedAt} format="date" />
<DescriptionList.Item
id="total"
label="Total"
value={order.total}
format="currency"
currency="EUR"
reserveFor={99999}
/>
<DescriptionList.Item
id="tracking"
label="Tracking"
value={order.tracking}
editable
copyable
/>
<DescriptionList.Item
id="note"
label="Note"
value={order.note}
editable={{ type: "textarea" }}
wide
/>
</DescriptionList>
)
}Pass flash={false} to a fact that changes all the time (a live counter) to keep its row quiet; the change
is still announced.
Values are yours: the list only renders them and reports saves through onValueChange(id, value) (the raw
string the field edited). Pass editable={{ validate, onSave }} to validate or persist per fact; a rejected
onSave keeps the field open with the error under it.
format picks how a value reads: text, number, currency, date (UTC, fixed locale, the same on the
server and in every time zone), badge (a StatusBadge with tone), link (with href) or custom
(your children). A missing value shows empty ("—") at muted-foreground, so the grid keeps its shape; an editable one
shows Add {label} (or your empty) as its edit button, and read-only shows "—".
Three presets share one look and one motion:
<DescriptionList preset="panel" /> {/* header on top, facts in a 2–3 column grid (default) */}
<DescriptionList preset="header" /> {/* facts in one wrapping row under the title, for page headers */}
<DescriptionList preset="sidebar" /> {/* one column, 280 px, for peek panels and drawers */}columns="auto" follows the list's own width (container queries): 1 column under 480 px, 2 under 880 px,
3 above. density="compact" tightens the spacing and uses the 24 px edit tile.
<DescriptionList>
<DescriptionList.Header title status actions avatar subtitle />
<DescriptionList.Item id label value />
<DescriptionList.Group heading="Shipping">
<DescriptionList.Item id label value />
</DescriptionList.Group>
</DescriptionList>Prop
Type
Also accepts all props of ComponentProps<"section">.
Prop
Type
Also accepts all props of Omit<ComponentProps<"header">, "title">.
Prop
Type
Also accepts all props of ComponentProps<"div">.
Prop
Type
Also accepts all props of Omit<ComponentProps<"div">, "children">.
The header preset puts five facts in one row under an editable title, with the ticket's status and its
actions on the right. The row wraps on narrow screens.
Plays in view · replayPlays in view · replay
Ticket #4821 · Platform
description-list, lively
The sidebar preset stacks one fact per row in a 280 px drawer beside the customer list, with the
customer's initials in the header's avatar slot and the account owner editable in place.
Plays in view · replayPlays in view · replay
description-list, lively
<dl> with <dt>/<dd> pairs grouped by <div>; the header is a <header>
whose title is an <h2> (headingLevel changes it). Groups are role="group" with an <h3>.InlineEdit button, named Edit {label}: {value}; the copy ball is a real
button named Copy {label} that announces "Copied". The copy ball is visible on hover and focus, and
always on touch screens.aria-hidden; the delta chip is
foreground text on brand-muted, and the wash sits behind the fact, never over its text or a
neighbour's. The status is
a StatusBadge with its text, never colour alone.muted-foreground on a pill of 50% muted over card. Measured contrast:
default theme 5.9:1 light, 7.0:1 dark; shadcn zinc 4.6:1 light, 6.2:1 dark; shadcn slate 4.55:1 light,
6.2:1 dark (AA 4.5:1 in all). Values are never dimmed. The label pill and the loading pills are aria-hidden boxes; the list sets aria-busy
while loading.| Key | Action |
|---|---|
| Tab / Shift + Tab | Moves through editable values, copy balls, links and actions in order |
| Enter / Space (on a value) | Opens the value as its inline-edit field |
| Enter | Saves a one-line value; Cmd/Ctrl + Enter saves a multiline one |
| Escape | Cancels the edit and keeps the value |
| Enter / Space (on copy ball) | Copies the value and announces Copied |
Focusing or pressing anything while the facts are still arriving lands them all at once, so an edit never opens during the arrival.
With reduced motion (the OS setting, or MotionKitProvider reducedMotion="always") the facts fade in
together with no rise, editable tiles do not lift, changed numbers crossfade instead of rolling, old text
does not drift and the status dot does not kick. The change wash and the delta chip still appear (a fade
in place), because they carry information. The header, the pills, the rim and every value are the same.
transform and opacity. Nothing
animates at rest; a change animates only the changed fact's wash (opacity) and delta chip.Roll with reserveFor so a change never shifts the grid; the wash is absolutely
positioned behind the fact and the delta chip sits in the label row, so neither moves the layout.
Dates are formatted from props with a fixed locale and UTC.inline-edit, status-badge and copy-button count in
their own items, and motion is a peer.Main spring of each temperament. Set it with the temperament prop or MotionKitProvider; the default is lively.
Not measured yet · budget 19.4 kB gzip
Component and MotionKit helpers; excludes react, react-dom, motion.
entering the viewport, a value change, hover, press
The facts fade in together with no rise, editable tiles do not lift, changed numbers crossfade instead of rolling, the status dot does not kick and the change wash and delta chip fade in place.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)