ComponentsForms
Label
A caption for a form control, with a required marker.
A caption for a form control, with a required marker.
<Label htmlFor="email">Email</Label>
<Input id="email" />The same component at all four levels. Pick the one that fits your project; they share tokens, so they mix.
npm i junco @junco/tailwindimport { Label } from "junco";
<Label htmlFor="email" isRequired>Email</Label>
<Input id="email" required />Label#Also takes every native <label> attribute.
htmlForisRequired| Prop | Type | Default |
|---|---|---|
htmlForId of the control it labels. | string | – |
isRequiredShows a required marker (hidden from screen readers; set required on the control). | boolean | false |