Label
boldkit/labelFreeComponent
Renders an accessible label for form controls
Live preview
live · rendered by the registry
Rendered by boldkit on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://boldkit.dev/r/label.jsonSource
1import * as React from 'react'2import * as LabelPrimitive from '@radix-ui/react-label'3import { cva, type VariantProps } from 'class-variance-authority'4import { cn } from '@/lib/utils'56const labelVariants = cva(7 'text-sm font-bold uppercase tracking-wide leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70'8)910const Label = React.forwardRef<11 React.ElementRef<typeof LabelPrimitive.Root>,12 React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &13 VariantProps<typeof labelVariants>14>(({ className, ...props }, ref) => (15 <LabelPrimitive.Root16 ref={ref}17 className={cn(labelVariants(), className)}18 {...props}19 />20))21Label.displayName = LabelPrimitive.Root.displayName2223export { Label }
What it pulls in
npm packages
Other registry items
Files it writes
More from boldkit
All 94 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | boldkit | Components | Free | 2 deps | |
| Alertalert | boldkit | Components | Free | 2 deps | |
| Alert Dialogalert-dialog | boldkit | Components | Free | 1 dep | |
| ASCII Shapesascii-shapes | boldkit | Components | Free | no deps | |
| Aspect Ratioaspect-ratio | boldkit | Components | Free | 1 dep | |
| Avataravatar | boldkit | Components | Free | 1 dep | |
| Badgebadge | boldkit | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | boldkit | Components | Free | 2 deps |
