Description List

View as Markdown

A record's facts as label and value pairs, in rows or columns, with Copy for ids.

Order
#10482
Status
Shipped
Total
$1,284.00Paid with Visa ending 4242
Ship to
Đặng Thị Ngọc Hân, 18 Rue des Écoles, 75005 Paris, France
Tracking
1Z 999 AA1 01 2345 6784

When to use

A record's facts as label and value pairs, in rows or columns, with Copy for ids. Use Record Detail instead when people edit the fields in place.

Usage

import { DescriptionList } from "./ui/uicontext/components/DescriptionList.ts"
export const Invoice = <M>(h: Html.H<M>) =>	DescriptionList(h, {		items: [			{ term: "Invoice", value: "INV-2026-0412", copy: "INV-2026-0412" },			{ term: "Due", value: "4 January 2027" },			{ term: "Amount", value: "€2,400.00" },		],	})

Examples

Columns

layout: "columns" sets the pairs side by side and wraps them as the space narrows.

Status
Available
Region
eu-central-1Frankfurt
Engine
Postgres 17.2
Size
db.r6g.xlarge4 vCPU · 32 GB
Storage
412 GB of 1 TB
Backups
Daily at 03:00 UTCKept 14 days

API reference

Options

DescriptionList options
NameTypeDescription
itemsrequiredDescriptionItem<Message>[]—
layout"rows" | "columns"Label beside value (the default), or pairs in columns.
boxedbooleanA border around the list, as a card.
labelstringNames the list for screen readers when the heading above doesn't: "Order details".
styleStyleStyleX styles applied after the list's own.

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/description-list

Source