Label
A native `<label>` that focuses its own control — reach for `FieldLabel` instead the moment the row lives inside a `Field`.
Default
A native `<label>`: clicking it focuses its control via `htmlFor`, including inside a Checkbox row.
Usage
import { Label } from '@oceanic-hub/brand-system'This is not @radix-ui/react-label: htmlFor is the plain HTML attribute rather
than an implicit-wrapping behaviour, and this file imports nothing. The dependency does ship —
Form needs it, and FormLabel is the Radix-typed variant. Point it at a control by id;
there is no other way it associates.
Field's FieldLabel is this component, positioned for a form row (mb-0 in place of
the standalone mb-1.5, tailwind-merge keeps the later one). Reach for Label alone in a
short row like a checkbox or a switch; reach for FieldLabel the moment the row lives inside a
Field, because that is what wires the disabled-state opacity and the "wraps a whole Field"
card treatment.
That card treatment used to carry a defect (OCE-1874c), fixed at the component. Label's
own eyebrow look — mono, uppercase, 2px tracking — is right over a single line of label text and
was wrong around a FieldTitle + FieldDescription card, cascading the caption treatment onto
a title meant to read as a sentence. FieldLabel now resets it itself, scoped to exactly the
choice-card shape (has-[>[data-orientation]]:font-sans, normal-case, tracking-normal —
the same direct-child selector already gating the card's border), so the choice-card composition
on Field's own page needs no call-site override any more.
No required/optional marker prop: the asterisk is content, so it stays in children
where the surface can place and word it.
RTL is not supported. Nothing in this package has ever been laid out or measured
right-to-left; the refusal is package-wide, recorded in pairings.json under direction
(@OCE-1779).
In a field
FieldLabel is this same component, positioned for a form row — mb-0 in place of the standalone mb-1.5, because the Field owns the gap here.
API Reference
See the Label API page for every prop of every part, with types, defaults and the contract that pins them.