Label

A form label that dims and blocks pointer events when its peer input or group is disabled. Native label API, styled with Tailwind like the shadcn label.

src/registry/ui/label.tsx/r/label.json

Installation#

bash
npx shadcn@latest add @minidev/label

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/label.json

Usage#

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

export function Example() {
  return (
    <Label htmlFor="c1">Unchecked</Label>
  )
}

API reference#

Also accepts every prop of <label>, passed through to the root element.

Examples#

All form components