docs / core / label
Label
the name of a form control, click it and the control focuses. never a heading or a caption.
intensity · recedesrsc · server
provenance
authored in usvalayer
core / primitivesintensity
recedes · safe anywhere, including dense surfacescomposition
above an Input or Select, beside a Checkbox, wired with htmlFormono for tokens, ids and machine namesnever a section heading or a captiondisabled dims the label only. disable the control tooa11y
a real<label> · htmlFor clicks through to the control · disabled sets data-disabledjest-axelive demo · try it out
props
| prop | type | default | notes |
|---|---|---|---|
| htmlFor | string | — | the control's id. clicking the label focuses it. |
| disabled | boolean | false | muted, not-allowed styling and data-disabled. style only, disable the control too. |
| mono | boolean | false | the monospace family, for tokens, ids and machine names. |
get it
bun add @usva-ui/reactusage
import { Input } from "@usva-ui/react/primitives/input";
import { Label } from "@usva-ui/react/primitives/label";
<Label htmlFor="email">Email</Label>
<Input id="email" type="email" placeholder="you@usva.dev" />