Forms · Application UI
Label
A styled wrapper around the native HTML label element with consistent typography and disabled-state handling.
Feature showcase
Installation
Features
7 examples
Default, Disabled, Error State, Form Layout, Required, With Checkbox, With Icon.
API
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | - | Additional CSS classes to merge with the default label styles. |
| htmlFor | string | - | Associates the label with a form control by its id. |
| children | React.ReactNode | - | The label text or content. |
Source and related
| File | Path |
|---|---|
| Component | registry/ui/label.tsx |
| Default example | content/examples/label/default.tsx |
| Disabled example | content/examples/label/disabled.tsx |
| Error State example | content/examples/label/error-state.tsx |
| Form Layout example | content/examples/label/form-layout.tsx |
| Required example | content/examples/label/required.tsx |
| With Checkbox example | content/examples/label/with-checkbox.tsx |
| With Icon example | content/examples/label/with-icon.tsx |