Skip to the page
Supply UI

Card

One thing lifted out of the page: an item a person picks or acts on (a room, an order), or one task (a form, a group of settings). Never a card in a card.

Preview

Invoice 0412

Kestrel Studio, due 30 November

Amount
£840.00
Status
Unpaid

Use

The code of the preview above
import {
  Badge,
  Button,
  Card,
  CardBody,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
  DescriptionList,
} from '@/components/ui';

<Card>
  <CardHeader>
    <CardTitle>Invoice 0412</CardTitle>
    <CardDescription>Kestrel Studio, due 30 November</CardDescription>
  </CardHeader>
  <CardBody>
    <DescriptionList
      plain
      items={[
        { label: 'Amount', value: <span className="ui-mono">£840.00</span> },
        { label: 'Status', value: <Badge tone="warning">Unpaid</Badge> },
      ]}
    />
  </CardBody>
  <CardFooter>
    <Button variant="ghost">Download</Button>
    <Button variant="primary">Send reminder</Button>
  </CardFooter>
</Card>

This page as text, for an AI

Options

OptionTypeWhat it does
raised booleanStands out with the theme's deeper shadow in place of its edge.

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

Parts

What goes inside one.

Without React

The same look on any HTML, with the classes ui-card….

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

components/card.csscomponents/resizable-panels.csscomponents/inset.csscomponents/tab-bar.csscomponents/page-transitions.css

In the examples

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

Sales€4,12012% on October
Orders968 more
Returns32 fewer
The month in three numbers A figure, its change, and the line that led there
Buttermilk pancakes4 servings
Flour
250 g
Milk
300 ml
Eggs
2
Butter
30 g
Cook for more Drag the servings and every amount follows

This week, by product

Linen tote18%
Enamel mug9%
Wall calendar44%
Sticker sheet2%
Which ones sell A line for each product, the change beside it
book.harbour.studioChecked every minuteUp
Two weeks99.79%
Answer212 ms
Last down9 Nov
Still up Two weeks of checks, the dips hatched

Showing things: states, do and don’t

One thing lifted out of the page: an item a person picks or acts on (a room, an order, a file), or one task (a form, a group of settings). Not for a section, text, facts, quotes or questions: those sit on the page (rule 15). Never a card in a card, nor a card round a component that is a box already. Cards in a row are one height and their CardFooter sits at the foot, so their buttons line up: keep a card's price and button in its footer.

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.