Label
scificn/labelFreeComponent
Accessible form label using Radix UI Label primitive.
Live preview
live · rendered by the registry
Rendered by scificn on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.scificn.dev/r/label.jsonSource
1import * as React from 'react'2import * as LabelPrimitive from '@radix-ui/react-label'3import { cn } from '@/lib/utils'45const Label = React.forwardRef<6 React.ElementRef<typeof LabelPrimitive.Root>,7 React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>8>(({ className, ...props }, ref) => (9 <LabelPrimitive.Root10 ref={ref}11 className={cn(12 'text-[0.7rem] font-mono font-medium uppercase tracking-widest',13 'text-[var(--text-secondary)]',14 'peer-disabled:opacity-40 peer-disabled:cursor-not-allowed',15 'select-none',16 className17 )}18 {...props}19 />20))21Label.displayName = LabelPrimitive.Root.displayName2223export { Label }
What it pulls in
npm packages
More from scificn
All 33 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Alertalert | scificn | Components | Free | 1 dep | |
| Badgebadge | scificn | Components | Free | 1 dep | |
| Bar Chartbar-chart | scificn | Components | Free | no deps | |
| Breadcrumbbreadcrumb | scificn | Components | Free | no deps | |
| Buttonbutton | scificn | Components | Free | 2 deps | |
| Cardcard | scificn | Components | Free | no deps | |
| Checkboxcheckbox | scificn | Components | Free | 1 dep | |
| Dialogdialog | scificn | Components | Free | 1 dep |
