Label
Renders an accessible label associated with form controls using Radix UI primitives.
import
import { Label } from "@/components/ui/label/label";$
npx @bloomui-react/cli add labellabel.tsx
Default
Standard form label component associated with an input.
Sizes
Set label font size using the size prop: sm, md, or lg.
size:
sm | md | lgRequired Indicator
Add a red asterisk indicator to required field labels using the isRequired prop.
isRequired: boolean
Props — Label
Supported properties for the Label component.
| Prop | Type | Default | Description |
|---|---|---|---|
| isRequired | boolean | false | Renders a red asterisk required indicator. |
| size | 'sm' | 'md' | 'lg' | 'sm' | Font size variant for label text. |
| htmlFor | string | — | ID of the associated form control input. |