Skip to content

shadcn.io is not affiliated with official shadcn/ui

Shadcn Label for React

Caption for a form control.

Installation

bunx --bun shadcn@latest add https://kit.dev/r/base/label.json

Usage

import { Checkbox } from "@/components/ui/checkbox";
import { Label } from "@/components/ui/label";
<div className="flex items-center gap-2">
  <Checkbox id="terms" />
  <Label htmlFor="terms">Accept terms and conditions</Label>
</div>

For form fields, prefer Field and FieldLabel.

Demos

Rtl

Right-to-left label. See the RTL configuration guide for document direction.

API Reference

Label

PropType
AttributeType