Label
Form label element
UI PrimitiveForm Inputs
Overview
Built on Radix UI's Label primitive. Renders a <label> element that associates with its sibling input. Supports a required indicator and disabled peer styling.
Usage
import { Label, Input } from "@leanicon/web-builder-library";Notes
- Accepts all standard Radix
Label.Rootprops. - When paired with a disabled input (
peer-disabled), the label automatically reduces opacity. - The required asterisk is
aria-hidden="true"— userequiredon the input itself for accessibility. - Dark mode is handled via semantic tokens.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
asChild | boolean | — | No | |
required | boolean | — | No |