Label
Standalone label for toggle rows and settings entries that do not need a full Field envelope.
<Label> is a standalone label that wires to a control via an explicit htmlFor
prop. It renders the same visual style and required indicator as the Field.Label
slot inside <Field>.
When to use
Use <Field> when you need the full envelope: auto-generated IDs, description,
error message, and ARIA wiring. Field's shorthand props (label, description,
error) mean it's only one wrapper, not a verbose compound block — see
Field.
Use <Label> when you are composing a simpler row yourself — a toggle with a
label, a settings entry, or any spot where the full Field structure is
more overhead than the layout needs.
Basic example
htmlFor must match the id (or testID on native) of the target control:
On web, clicking the label text moves focus to and toggles the associated Switch.
On native, the label is presentational — wrap both in a Pressable if you need
the full tap target.
Required
Pass required to show the visual indicator and an accessible label on the
indicator span (controlled by the same field.requiredIndicator /
field.requiredLabel dictionary keys as Field):
<Label> does not set aria-required on the target — that attribute lives on
the control, not the label. If you need ARIA threading, use <Field> with the
required prop instead.
Disabled
Pass disabled to dim the label text. This is a visual hint only — it does not
disable the associated control:
Disable the control separately.
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
htmlFor* | string | — | — |
className | string | — | — |
disabled | boolean | false | — |
required | boolean | false | — |
testID | string | — | — |