Label
Accessible form labels with proper control association and styling.
Installation#
pnpm dlx shadcn@latest add @davinciui/labelUsage#
Disabled#
API Reference#
| Prop | Type | Default |
|---|---|---|
htmlForAssociates the label with a control id. | string | — |
classNameAdditional CSS classes. | string | — |
Accessibility#
A native label element, so association works through htmlFor or nesting and screen readers announce it with the control. It adds no ARIA and is not focusable; disabled styling depends on the peer-disabled class.
Motion#
Static wrapper primitive with no animation, timing props, or motion logic. No prefers-reduced-motion handling is needed because nothing animates at all.
View source
Click the icon in the preview toolbar to browse source for each variant.
Keep in mind
This component is inspired by various open-source projects and patterns. Please verify licenses and implementation details before using in production.
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

