formstexulinot agent-emittableapp
Label
label
A form label with optional required marker and sr-only mode.
Live examples
Required label
Required label
Loading demo…
Props
| Name | Kind | Required | Default | Description |
|---|---|---|---|---|
required | boolean | no | false | — |
size | enum (sm, md) | no | "md" | — |
srOnly | boolean | no | false | — |
class | string | no | — | — |
children | slot | no | — | The label text (an inline-text node in a tree) |
Keyboard
| Key | Action |
|---|---|
— | See accessibility notes for keyboard behavior. |
Accessibility
- srOnly keeps the label for assistive tech while hiding it visually.
Evidence for label
Latest committed gates for label (as of 2026-10-23). Static snapshot — not live CI.
Behavior
checkedscenario label
Rows in tests/behavior/scenarios/label.spec.ts, held to the WAI-ARIA APG pattern, run on Chromium, WebKit and the Pixel 7.
Size (gzip)
@texuli/primitives/label · budget 4.00 KiB
Budget from texuli.budgets.json; re-measure with `pnpm size --filter <entry>`.
Axe
documented
tests/e2e/site-component-pages.spec.tsdocs/quality (a11y-*)
Site component pages axe gate; package-level a11y docs under docs/quality when present.
Browsers
chromiumwebkitmobile
Playwright projects: Desktop Chrome, Desktop Safari, Pixel 7. Firefox is a known gap on this host.
When to use
Use when
- Label a control outside Field
Don’t use when
Prefer another component
- A full field stack (use field)