Back to Components
Inputs

Label

Accessible form label with variant styles.

PropsUsage ExampleVariations

Dependencies

  • clsx
  • tailwind-merge
  • @radix-ui/react-label
  • class-variance-authority

Files

  • components/ui/label.tsx

Installation

Using shadcn CLI

npx shadcn add label --url https://ui.hampton.io

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge @radix-ui/react-label class-variance-authority

Related Inputs Components