Label

Form field label. Connects an input through the for attribute; clicking the label focuses the matching control.

Default

Plain text label tied to an input via for/id.

Dark previewReplay previewOpen in new tab

Usage

Import the parts you need from the component's folder.

ts
import { Label } from "@/components/ui/label";

With Field

Compose Label inside Field to add a description and consistent spacing.

Dark previewReplay previewOpen in new tab

This is your public display name.

With checkbox

Pair with a Checkbox so the label toggles the control.

Dark previewReplay previewOpen in new tab

Required

Add a required marker inside the label.

Dark previewReplay previewOpen in new tab

API Reference

Label

PropTypeDefaultDescription
forstring—ID of the input this label belongs to.
classstring—Override typography or spacing.