# CardHeader

Supply UI 1.1.0. Showing things, part of `Card`.

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

The top of a Card, holding its title and description

## Options

No options of its own.

It also takes the 280 attributes of the element or UI SDK part it renders (`className`, `aria-label`, events…).

## Without React

Classes: `ui-card…`

## CSS parts

With the CSS in parts (`/ui/css/`), it needs: `components/card.css`, `components/resizable-panels.css`, `components/inset.css`, `components/tab-bar.css`, `components/page-transitions.css`, besides the ones every page loads.

## In the examples

- Which ones sell: A line for each product, the change beside it (https://www.supply.family/ui/#scene-sellers)
- Loading, politely: Grey shapes hold the place until the classes arrive (https://www.supply.family/ui/#scene-loading)
- Vote, then see: Results stay hidden until you have picked (https://www.supply.family/ui/#scene-poll)
- Who is on today: A name opens a card about the person (https://www.supply.family/ui/#scene-shifts)
- Whose turn: Give each chore to someone. The faces follow. (https://www.supply.family/ui/#scene-rota)

## Showing things: notes

**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.
