GitHub
DocsLabel

Label

Renders an accessible label associated with a form control.

Preview

Installation

npx shadcn@latest add label

Usage

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

<Label htmlFor="email">Email</Label>
<Input type="email" id="email" />

Props

Extends the native <label> element. Use htmlFor to associate it with an input by id.