Card

A card that holds one thing: a staff member, a booking, a group of settings. The card tint, one tint of ink with no edge, as a card's sections, with squircle corners, in two sizes. Built on the vendored shadcn card.

Playground

Anna Kováčová
Senior stylist
Mo 09:00–17:00Tu 09:00–17:00We 12:00–20:00
Card
Parts

Anatomy

A header holds the title, an optional description, and an optional action pinned top-right. Content comes next, then an optional footer: a porcelain band for the card's own actions. Every part is optional; the card spaces whatever it holds.

Marek Horváth
Barber
Tu 10:00–18:00Th 10:00–18:00Sa 08:00–14:00

Sizes

md spaces its parts 16px apart and from the edge. sm tightens that to 12px and steps the title down to 14px, for cards packed in a grid or a narrow column.

Haircut & beard
45 min · €32.00

Clipper and scissor cut, beard shaped with a hot towel.

Haircut & beard
45 min · €32.00

Clipper and scissor cut, beard shaped with a hot towel.

In a grid

Packed in a grid, cards step down to sm. A figure reads best large and in tabular figures, in the content, with its label above it as the description.

Bookings today

12

3 still to come

Booked by Okami

9 of 12

The rest by hand

Revenue this week

€1,284.00

Up €96.00 on last week

With a footer

The footer holds the card's own actions, trailing, a step down from the page's one primary action.

Balayage
Thursday 15 October, 14:00–16:30 · with Anna
Petra Nováková · +421 911 234 567

API reference

PropTypeDefaultDescription
size"sm" | "md""md"Card only. The inset around and between its parts: 12 or 16px. sm also steps the title down to 14px.
flushbooleanfalseCard only. Its last part runs to the bottom edge, with no inset under it: a table.
level1 | 2 | 3 | 4 | 5 | 6—CardTitle only. Makes the title a heading at this level (role and aria-level), for the page's outline.
classNamestring—Layout on any part: width, grid placement, flex inside CardContent or CardFooter. Never restyle the surface.

Every part renders a <div> and passes everything else through. CardAction sits top-right of the header, across the title and description.

Guidelines

  • A card holds one thing. When it would hold a list of like things, use a Table, and put it in a card only if it needs a title.
  • Don't nest cards. Inside a card, group with space or a Separator.
  • A whole card is never a link or a button. Put the action in the header's CardAction or in the footer, where it can be focused and named.
  • Give the title a level when the card heads a section, like a staff member on the team page, so screen-reader users can jump between cards.