Skip to the page
Supply UI

Description list

In code: DescriptionList

Facts about one thing: name on the left, value on the right, a hairline between the rows

Preview

Phone
020 7946 0321
Address
12 Quay Street, Bristol
Open
Tue to Sat, 09:00 to 20:00

Use

The code of the preview above
import { DescriptionList } from '@/components/ui';
import { Clock, MapPin, Phone } from 'lucide-react';

<div className="ui-grow">
  <DescriptionList
    items={[
      { label: 'Phone', value: <span className="ui-mono">020 7946 0321</span>, icon: <Phone /> },
      { label: 'Address', value: '12 Quay Street, Bristol', icon: <MapPin /> },
      { label: 'Open', value: 'Tue to Sat, 09:00 to 20:00', icon: <Clock /> },
    ]}
  />
</div>

This page as text, for an AI

Options

OptionTypeWhat it does
items Needed{ label: ReactNode; value: ReactNode; icon?: ReactNode; }[]icon (a Lucide icon) goes before the name: a phone, a pin, a clock.
plain booleanWithout the lines between the rows: a few short facts in a card.

It also takes the 279 attributes of the element or UI SDK part it draws: className, aria-label, events and the rest.

Without React

The same look on any HTML, with the classes dl.ui-dl > div.ui-dl-row > dt (+ span.ui-dl-icon) + dd; ui-dl--plain.

With the CSS in parts (/ui/css/), it needs these, besides the ones every page loads:

components/description-list.csscomponents/prose.css

In the examples

Small screens made with it and the rest of the kit. They work: click, type and choose in them.

Buttermilk pancakes4 servings
Flour
250 g
Milk
300 ml
Eggs
2
Butter
30 g
Cook for more Drag the servings and every amount follows
  • Noor Haddad#1187
  • Otis Brandt#1188
  • Yuki Tanabe#1189
Details from below An order rises as a drawer you can drag
Invoice 0421Kestrel Studio
Draft
WorkQtyPriceLine
€900.00
€240.00
Subtotal
€1,140.00
VAT 21%
€239.40
Total
€1,379.40
An invoice that adds up Change a quantity or a price; the lines and VAT follow
Subtotal
€84.00
Discount
—
Total
€84.00
Codes that check themselves Type a code and the total answers

Showing things: states, do and don’t

Facts about one thing, name left and value right, with a hairline between the rows: details, contacts, opening hours. An item's icon goes before its name. plain drops the lines, for a few short facts in a card.

States. Lists, tables and boards have three more states besides their content: empty (Empty, with the first action inside), loading (Skeleton) and failed (Alert tone="danger"). A chosen row shows in ink, never in the brand colour.

Do

  • Put numbers, dates and codes in ui-mono (in a table cell, ui-num, which also aligns them).
  • Let a Table turn into blocks on a phone; give it scroll only when it is read down its columns.
  • Show a status in words and colour together (Badge tone="success" with "Paid"), never colour alone.

Don't

  • Don't put a card round a Table, List, Cells, Calendar or Empty: they draw their own box.
  • Don't truncate a name or a price to fit; let it wrap. Truncate only file names and addresses.
  • Don't use the status colours (success, warning, danger, info) for anything but those meanings.