Label
Correct association with the control and a shared typographic hierarchy.
Installation
Run it from the root of a project already set up with zunoui init.
npx zunoui@latest add labelDependencies
What add label installs alongside the component. The CLI skips any you already have in a compatible version.
ZUNO registry
@zuno/utils
Examples
1 examples · 1 componentLinked label and control
htmlFor connects the label to the input.
API reference
Forwards props and ref to the container element; it only adds composition utilities.
| Prop | Type | Default |
|---|---|---|
htmlForId of the associated control. | string | — |
Accessibility
Associate the label with the control using htmlFor and the field's id, or by wrapping the control.
Do not replace the label with the placeholder; the name must persist.