GitHub Stars

Label

Renders an accessible label associated with a control.

Installation

npx shadcn@latest add @fulldev/label

Usage

import { Label } from "@/components/ui/label"
<Label for="email">Email</Label>

Notes

  • Match for on Label with the target control id.
  • Use Label directly for simple forms and one-off controls.
  • When you need descriptions or validation, prefer Field and FieldLabel.

Example

<Label for="terms">Accept terms and conditions</Label>

API Reference

See the GitHub source code for more information on props.