UI ComponentsForms
Label
Associate visible text with a form control.
Import
import { Label } from "@puzzle-ui/ui";Usage
Match htmlFor to a control's id. Indicators are visual cues: configure required on the control itself as well. Prefer FormField when also displaying a description or error.
API
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Visible label text. |
htmlFor | string | - | Associated input ID. |
required | boolean | false | Adds a decorative required marker. |
optional | boolean | false | Adds optional text. |
Standard native label attributes, className, and style are supported.