Label

Accessible label for form controls.

inputs
form
accessibility
label

Preview

Variants

Default label for input fields.

Code

TSX
1
2
3
4
5
6
7
8
9
10
import { Label } from "@/components/ui/label"

export function LabelDemo() {
  return (
    <div className="grid gap-1.5">
      <Label htmlFor="email">Email</Label>
      <Input type="email" id="email" placeholder="Email" />
    </div>
  )
}

API Reference

PropTypeDefaultDescription
htmlForstring-Associates the label with a form control.
disabledboolean-Whether the label is disabled.