# ItemText

Supply UI 1.1.0. Layout.

A name and a line under it: a person and their role, a product and its price, a file and its size. Set tight so the two read as one; never build the pair from two loose lines of text. `size="lg"` for the heading of a card

A name and a line under it: a person and their role, a product and its price. Tight, so the two read as one. `size="lg"` for the heading of a card: "Ines Duarte / Tutor".

## Options

| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `title` (needed) | `ReactNode` |  | The name: a person, a product. |
| `note` | `ReactNode` |  | The quieter line under it: a role, a price. |
| `size` | `"lg"` |  | Its size, one step from the theme's Size: `sm`, `md` (default) or `lg`. |

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

## Without React

Classes: `span.ui-item-text` > `.ui-item-title` + `.ui-item-note`; `ui-item-text--lg`

## In the examples

- Jobs on the press: Drag a job along. The press takes three at a time. (https://www.supply.family/ui/#scene-print)
- Still up: Two weeks of checks, the dips hatched (https://www.supply.family/ui/#scene-uptime)
- Details from below: An order rises as a drawer you can drag (https://www.supply.family/ui/#scene-orders)
- Loading, politely: Grey shapes hold the place until the classes arrive (https://www.supply.family/ui/#scene-loading)
- Prove it is you: Six boxes, and the last digit checks the code (https://www.supply.family/ui/#scene-code)
- Mark the allergens: Pick from the list and the menu line writes itself (https://www.supply.family/ui/#scene-allergens)
- Fresh by seven: Reserve loaves the night before. The total keeps up. (https://www.supply.family/ui/#scene-bakery)
- Who still owes: Nudge a client and the row remembers (https://www.supply.family/ui/#scene-owing)
- A licence for the team: Pick the use and the people; five or more pay less (https://www.supply.family/ui/#scene-font-licence)
- Tabs under the thumb: On a phone the sections sit along the bottom (https://www.supply.family/ui/#scene-phone-tabs)
- Sections on one page: Pills switch what the profile shows (https://www.supply.family/ui/#scene-profile)
- 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)
- A free morning for Biscuit: Days with room are marked. The times follow the day. (https://www.supply.family/ui/#scene-vet)
- When the box comes: Type or pick the day, then the part of it (https://www.supply.family/ui/#scene-delivery)
- 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)
- 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)

## Layout: notes

**States.** Layout follows the box it is in, not the window: `Split`, `Grid`, `AppShell` and the site parts stack when their box is narrow, at any width of the window.

**Do**
- Space with `gap` (`Stack`, `Row`, `Grid`), never with margins on children.
- Put the page's sections straight on the page, under their titles; a `Card` is one thing a person picks or acts on.
- Check every screen at 320, 375 and 768 px with the narrow check of rule 10.

**Don't**
- Don't give a box a fixed width, or a `min-height` together with an `aspect-ratio`.
- Don't nest a card in a card.
- Don't put two `<main>`s on a page: a screen shown inside another page takes `Main as="div"`.
