Label

Renders an accessible label for form controls.

Preview

Installation

Use the CLI to add this component to your project.

npx shadcn@latest add https://ui.nyxhora.com/r/label.json

Usage

tsx
5 lines
1
2
3
4
5
import { Label } from "@/components/ui/label"

export default function MyComponent() {
  return <Label htmlFor="field">Label</Label>
}

Examples

With Required Indicator