Label

Renders an accessible label associated with controls.

Installation

pnpm dlx cubix@latest add label --base radix

Usage

Import
import { Label } from "@/components/cubix/label"
Example
<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

PropTypeDefaultDescription
htmlForstring-The id of the control this label is associated with.
classNamestring-Additional Tailwind classes merged with the component styles (last one wins).
childrenReact.ReactNode-The label text or content.