Component

Label

Accessible form label. Associates with an input via htmlFor, styled 12px Inter 500.

With Input

tsx
<Label htmlFor="photo-title">Photo title</Label>
<Input id="photo-title" placeholder="Cascade Range, WA" />

With Textarea

tsx
<Label htmlFor="photo-desc">Description</Label>
<Textarea id="photo-desc" placeholder="Shot at sunrise..." />

Props

PropTypeDefaultDescription
htmlForstringID of the associated form control.
classNamestringAdditional Tailwind classes.
childrenReactNodeLabel text.