Label

Styled <label> element. Use it above any form control — pair it with htmlFor matching the control's id.

Installation

npm install @bloomkit/react

Usage

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.

PropTypeDefaultDescription
htmlForstringLinks the label to a form control by matching its id
childrenReactNodeLabel text or content
classNamestringExtra Tailwind classes
...propsLabelHTMLAttributes<HTMLLabelElement>All standard label attributes are forwarded