Label
A styled label for form controls.
Import
import { Label } from '@oztix/roadie-components'
Examples
Default
<Label>Email address</Label>
Guidelines
Prefer Field.Label
In most cases, use Field to wrap your form controls
instead of using Label directly. Field.Label automatically wires
htmlFor, provides consistent spacing, and supports showIndicator for
required/optional indicators.
<Field required><Field.Label showIndicator>Full name</Field.Label><Field.Input /></Field>
When to use standalone Label
Use Label only when you need a styled label outside of a Field wrapper —
for example, a label next to a standalone toggle or a non-form context.
Accessibility
- When used standalone, pair with a form control using matching
htmlForandidattributes. - Renders a native
<label>element for built-in browser accessibility. - Prefer
Field.Labelwhich handleshtmlFor/idwiring automatically.
API reference
Label
No additional props — forwards all standard HTML attributes to the underlying element.