# Hint

A question mark after a label that explains one setting on demand, so a page at rest shows names and controls.

Live variants: https://design.arcadia.is/components/hint

```tsx
import { Hint } from "@arcadia/ui";
```

```tsx
import {
  SettingsGroup, SettingsRow, SegmentedControl, Switch,
} from "@arcadia/ui";

<SettingsGroup label="Software update">
  <SettingsRow label="Check for updates" control={<Switch hideLabel label="Check for updates" defaultChecked />} />
  <SettingsRow label="Track" hint="Staging gets test builds before they are released."
    control={<SegmentedControl size="md" aria-label="Track" defaultValue="stable"
      items={[{ value: "stable", label: "Stable" }, { value: "staging", label: "Staging" }]} />} />
</SettingsGroup>
```

## Accessibility

The hint is a button named `About` and its label, described by its text, so a screen reader hears the sentence on the button without opening anything. In the tab order it follows its label and comes before the row's control. `Field` and `Switch` also give the text to their control as its description. It opens when the pointer rests on it and at once on keyboard focus; a press pins it, so touch and keyboard users can read it without holding anything.

- Enter or Space: Pins the hint open, or closes it
- Esc: Closes the hint and nothing under it
- Tab: Moves on to the control; the hint closes

## API reference

### Hint

- `label` (`string`, required): What it explains: the button's accessible name is `About ${label}`.
- `text` (`string`, required): One or two sentences, at most 160 characters. Plain text: no links, no controls, no markup.
- `side` (`"top" | "bottom" | "left" | "right" | "inline-start" | "inline-end"`, default `"top"`)
- `defaultOpen` (`boolean`, default `false`): Starts pinned open (a specimen, a first-run pointer).
- `tabbable` (`boolean`, default `true`): `false` keeps it out of the Tab order where its text already describes the control (a form field), so Tab goes field to field; the pointer still opens it.
- `container` (`PortalContainer`, default `document.body`): Portal container for the tooltip.
- `rootStyle` (`RootStyle`): Typed StyleX override: where the hint sits.
