Label
An accessible text label for a form control.
An accessible text label for a form control.
Import
import { Label } from 'bmates-ui';Basic usage
The example below mirrors the primary Storybook composition and can be used as a starting point.
<Label htmlFor="email">Email address</Label>Preview
<Label htmlFor="email">Email address</Label>Prop previews
The examples below isolate the props that change visual output or interaction.
Associated input
<Label htmlFor="band-name">Band name</Label>Component API
htmlFor
Associates the label with a form control ID.
children
Label content. Other native label props are supported.
Usage notes
- Every component in the table is exported from
bmates-ui. - Unless noted otherwise, a component also accepts the standard props of its underlying HTML element.
- For application-owned state, use a controlled value and its change handler instead of only a
default*prop.
