# Label

Supply UI 1.1.0. Helpers.

A label over a group of controls that is not one field (`Field` labels a single field)

Names any control by its `htmlFor`, also a slider or a radio group; a press on it moves focus there

## Options

| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `className` | `string` |  | More classes on the outer element, for layout around it (margins, grid placement), not to restyle it. |

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

## CSS parts

With the CSS in parts (`/ui/css/`), it needs: `components/fields.css`, `components/checkbox-radio.css`, `components/switch.css`, `components/resizable-panels.css`, `components/input-group.css`, `components/choice-cards.css`, `components/calendar.css`, besides the ones every page loads.

## Helpers: notes

Hooks and functions the components are made of, passed on so a project uses the same ones: keyboard shortcuts, options loaded while typing, search matching, saved preferences, screen-reader announcements, smooth sizes, the theme.

**Do**
- Use `useShortcut` for app-wide keys, and show the key with `formatShortcut` so it reads right on each computer.
- Use `announce()` to tell a screen reader what changed when nothing visible takes focus ("3 results").

**Don't**
- Don't turn off the smooth sizes `Toaster` starts; boxes would jump when their content changes.
