Label
Renders an accessible label associated with controls.
Installation
pnpm dlx cubix@latest add label --base ariaUsage
import { Label } from "@/components/cubix/label"<Label htmlFor="email">Your email address</Label>With Checkbox
With Input
Disabled
Set data-disabled on a parent group such as Field to dim the label with a disabled control.
With Textarea
API Reference
Label
| Prop | Type | Default | Description |
|---|---|---|---|
| htmlFor | string | - | The id of the control this label is associated with. |
| className | string | - | Additional Tailwind classes merged with the component styles (last one wins). |
| children | React.ReactNode | - | The label text or content. |