Skip to content
SevenOne

Search documentation

Search pages and components

Label

Names a form control. Clicking the label focuses the control. Add required to show the asterisk.

Installation

npx shadcn@latest add @sevenone/label

Usage

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

Examples

Default and required

<Label htmlFor="company">Company</Label>
<Label htmlFor="email" required>Email address</Label>

Accessibility

  • The asterisk is decorative (aria-hidden); also set required on the input.
  • Text is 16px and 7:1.