ComponentsLabel

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

Public props for Label
NameKindRequiredDefaultDescription
requiredbooleannofalse—
sizeenum (sm, md)no"md"—
srOnlybooleannofalse—
classstringno——
childrenslotno—The label text (an inline-text node in a tree)

Keyboard

Keyboard behavior for Label
KeyAction
—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

8 checks

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.ts
  • docs/quality (a11y-*)

Site component pages axe gate; package-level a11y docs under docs/quality when present.

Browsers

  • chromium
  • webkit
  • mobile

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)