Label
Styled <label> element. Use it above any form control — pair it with htmlFor matching the control's id.
Installation
npm install @bloomkit/reactUsage
import { Label, Input } from "@bloomkit/react";
<div className="flex flex-col gap-2">
<Label htmlFor="email">Email</Label>
<Input id="email" type="email" placeholder="jane@example.com" />
</div>Props
All standard <label> HTML attributes are supported. Forwards ref to the <label> element.
| Prop | Type | Default | Description |
|---|---|---|---|
| htmlFor | string | — | Links the label to a form control by matching its id |
| children | ReactNode | — | Label text or content |
| className | string | — | Extra Tailwind classes |
| ...props | LabelHTMLAttributes<HTMLLabelElement> | — | All standard label attributes are forwarded |