Label

Renders an accessible label associated with controls.

For form fields, use the Field component which includes built-in label, description, and error handling.

Installation

pnpm add @ag/ui

Usage

import { Label } from "@ag/ui"
<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>

RTL

To enable RTL support in shadcn/ui, see the RTL configuration guide.

API Reference

See the Radix UI Label documentation for more information.