Skip to Content
Puzzle

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.

390 × 300

API

PropTypeDefaultDescription
childrenReactNodeRequiredVisible label text.
htmlForstring-Associated input ID.
requiredbooleanfalseAdds a decorative required marker.
optionalbooleanfalseAdds optional text.

Standard native label attributes, className, and style are supported.

On this page

;