# Cover

Supply UI 1.1.0. Showing things.

The top of a public page: a picture (painted from `seed`, or `image={<img … />}`) filling a band the width of the window, with a solid panel over it holding a title, a line and a button or a small form. `size`: `md`, `lg` (default), `full`. `align="center"` puts the panel in the middle. `bleed={false}` keeps it a rounded block in the column. Text never sits straight on the picture

A picture filling a band, the whole width of the window, with a solid panel over it that holds the words: the top of a hotel's or a restaurant's page. Text never sits straight on the picture, so it reads on any image.

## Options

| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `children` (needed) | `ReactNode` |  | What is said over the picture: a title, a line, a button or a small form. It sits on a solid panel. |
| `align` | `"center" \| "start"` | `'start'` | Where the panel sits: low at the start of the column (default), or in the middle. |
| `bleed` | `boolean` | `true` | Run the full width of the window (on by default), or stay a rounded block in the page column. |
| `image` | `ReactNode` |  | A real picture (an <img> or <video>) to fill the band; it wins over the painted one. |
| `seed` | `string` |  | Paints the picture from this word when there is no `image`. |
| `size` | `"md" \| "lg" \| "full"` | `'lg'` | Height: `md` (about half the window), `lg` (most of it, the default), `full` (all of it). |

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

## Without React

Classes: `section.ui-cover.ui-bleed` > `.ui-cover-media` + `.ui-cover-inner.ui-container` > `.ui-cover-panel`

## CSS parts

With the CSS in parts (`/ui/css/`), it needs: `components/cover.css`, besides the ones every page loads.

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