# Card

Supply UI 1.1.0. Showing things.

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

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.

## Options

| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `raised` | `boolean` |  | Stands 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 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

- The month in three numbers: A figure, its change, and the line that led there (https://www.supply.family/ui/#scene-numbers)
- Cook for more: Drag the servings and every amount follows (https://www.supply.family/ui/#scene-recipe)
- Which ones sell: A line for each product, the change beside it (https://www.supply.family/ui/#scene-sellers)
- Still up: Two weeks of checks, the dips hatched (https://www.supply.family/ui/#scene-uptime)
- More on right-click: The actions of a row, where the hand already is (https://www.supply.family/ui/#scene-right-click)
- Running low: Set a range and the shelf list narrows to it (https://www.supply.family/ui/#scene-stock)
- Take your data with you: Tick a whole branch or a single leaf (https://www.supply.family/ui/#scene-export)
- Loading, politely: Grey shapes hold the place until the classes arrive (https://www.supply.family/ui/#scene-loading)
- Join in three steps: A plan, a name, a tick. Next stays off until each step is done. (https://www.supply.family/ui/#scene-checkout)
- Prove it is you: Six boxes, and the last digit checks the code (https://www.supply.family/ui/#scene-code)
- Strong enough: Each rule ticks itself as the password meets it (https://www.supply.family/ui/#scene-password)
- Sign it once sure: Every step lands on the timeline. Signing asks twice. (https://www.supply.family/ui/#scene-contract)
- Set up, one step at a time: Open a step, mark it done, watch the bar (https://www.supply.family/ui/#scene-setup)
- Mark the allergens: Pick from the list and the menu line writes itself (https://www.supply.family/ui/#scene-allergens)
- Add without leaving: A dialog takes the details; the list grows behind it (https://www.supply.family/ui/#scene-new-client)
- Write it down: Styles from the toolbar, a tip on every button (https://www.supply.family/ui/#scene-note)
- Out of ten: A low score opens a question, a high one says thanks (https://www.supply.family/ui/#scene-score)
- Fresh by seven: Reserve loaves the night before. The total keeps up. (https://www.supply.family/ui/#scene-bakery)
- Pay yearly, keep two months: Switch the period and the prices follow (https://www.supply.family/ui/#scene-pricing)
- An invoice that adds up: Change a quantity or a price; the lines and VAT follow (https://www.supply.family/ui/#scene-invoice-lines)
- A licence for the team: Pick the use and the people; five or more pay less (https://www.supply.family/ui/#scene-font-licence)
- Where the month went: Pick a category to see its share (https://www.supply.family/ui/#scene-budget)
- In, out, and what is left: Three numbers on top, the rows under two tabs (https://www.supply.family/ui/#scene-books)
- Split the bill: Slide the tip, set the people, send the links (https://www.supply.family/ui/#scene-split-bill)
- Codes that check themselves: Type a code and the total answers (https://www.supply.family/ui/#scene-coupon)
- A sidebar with sections: Pick a section; its numbers change beside it (https://www.supply.family/ui/#scene-studio-sidebar)
- Icons in a rail: A narrow column, a name on hover, ink for where you are (https://www.supply.family/ui/#scene-rail)
- The top of a website: Links in a row, panels of links under them (https://www.supply.family/ui/#scene-site-header)
- Tabs under the thumb: On a phone the sections sit along the bottom (https://www.supply.family/ui/#scene-phone-tabs)
- Where am I: Open folders; the trail above takes you back up (https://www.supply.family/ui/#scene-files)
- Jump anywhere with ⌘K: Pages and actions in one search (https://www.supply.family/ui/#scene-jump)
- File, View, the old way: Menus of an application, ticks and choices included (https://www.supply.family/ui/#scene-editor-menus)
- Sections on one page: Pills switch what the profile shows (https://www.supply.family/ui/#scene-profile)
- Write, and see it sent: Type on the left; drag the line to make room (https://www.supply.family/ui/#scene-newsletter)
- Drop the photos in: Each file shows how far it has come (https://www.supply.family/ui/#scene-portfolio)
- Fit the badge: Drag and zoom the photo into the round frame (https://www.supply.family/ui/#scene-badge)
- Room by room: Swipe through the finished rooms, or use the arrows (https://www.supply.family/ui/#scene-rooms)
- When you are open: Close a day with a switch and its hours step aside (https://www.supply.family/ui/#scene-hours)
- Bill the minutes: Start, stop, and every stretch lands in the list (https://www.supply.family/ui/#scene-timer)
- Two weeks away: Tap the first day, then the last (https://www.supply.family/ui/#scene-time-off)
- A free morning for Biscuit: Days with room are marked. The times follow the day. (https://www.supply.family/ui/#scene-vet)
- Keep the streak: Minutes a day, and the run so far (https://www.supply.family/ui/#scene-streak)
- When the box comes: Type or pick the day, then the part of it (https://www.supply.family/ui/#scene-delivery)
- Vote, then see: Results stay hidden until you have picked (https://www.supply.family/ui/#scene-poll)
- Who is next: Drag a walk-in up the queue; the waits follow (https://www.supply.family/ui/#scene-queue)
- What people said: The average, how it splits, and a voice from it (https://www.supply.family/ui/#scene-reviews)
- Hand the shift over: Tick what is done. The ring fills as you go. (https://www.supply.family/ui/#scene-handover)
- Who has arrived: Find a guest and check them in at the door (https://www.supply.family/ui/#scene-check-in)
- Oat milk is on the list: Add a thing, tick it off at the shop (https://www.supply.family/ui/#scene-groceries)
- Share with a link: A popover with the switch and the link to copy (https://www.supply.family/ui/#scene-share)
- Screens, fairly: A bar turns amber, then red, as the day runs out (https://www.supply.family/ui/#scene-screen-time)
- 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.
