110k
New

Label

Renders an accessible label associated with controls.

Component label-demo not found in registry.

Installation

pnpm dlx createui@latest add label

Usage

import { Label } from "@/components/ui/label"
<Label htmlFor="email">Your email address</Label>

Label in Field

For form fields, use the Field component which includes built-in FieldLabel, FieldDescription, and FieldError components.

<Field>
  <FieldLabel htmlFor="email">Your email address</FieldLabel>
  <Input id="email" />
</Field>

Component field-demo not found in registry.

API Reference

See the Base UI Label documentation for more information.