registry:component
Label
v1.0.0ga
Accessible form label primitive.
Registry Endpoint
Open JSONnpx shadcn@latest add @aavya/ui-label
One-time setup — add the @aavya registry to your components.json so branded dependencies resolve to Aavya (not stock shadcn):
"registries": { "@aavya": "https://registry-dev.aavya.com/r/{name}.json" }Or install by full URL: npx shadcn@latest add https://registry-dev.aavya.com/r/ui-label.json
Live Preview
Props
Label forwards remaining props to LabelPrimitive.Root props.
Usage Snippet
import { Label } from '@/components/ui/label'
export default function Example() {
return (
<div className="p-6">
<Label />
</div>
)
}
Source Preview
'use client'
import * as React from 'react'
import * as LabelPrimitive from '@radix-ui/react-label'
import { cn } from '@/lib/utils'
function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
return (
<LabelPrimitive.Root
data-slot='label'
className={cn(
'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
className
)}
{...props}
/>
)
}
export { Label }