label
shadcn/labelFreeComponent
shadcn publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add labelSource
1"use client"23import * as React from "react"4import * as LabelPrimitive from "@radix-ui/react-label"5import { cva, type VariantProps } from "class-variance-authority"67import { cn } from "@/lib/utils"89const labelVariants = cva(10 "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"11)1213const Label = React.forwardRef<14 React.ElementRef<typeof LabelPrimitive.Root>,15 React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &16 VariantProps<typeof labelVariants>17>(({ className, ...props }, ref) => (18 <LabelPrimitive.Root19 ref={ref}20 className={cn(labelVariants(), className)}21 {...props}22 />23))24Label.displayName = LabelPrimitive.Root.displayName2526export { Label }
Files it writes
More from shadcn
All 62 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn | Components | Free | no deps | |
| alertalert | shadcn | Components | Free | no deps | |
| alert-dialogalert-dialog | shadcn | Components | Free | no deps | |
| aspect-ratioaspect-ratio | shadcn | Components | Free | no deps | |
| attachmentattachment | shadcn | Components | Free | no deps | |
| avataravatar | shadcn | Components | Free | no deps | |
| badgebadge | shadcn | Components | Free | no deps | |
| breadcrumbbreadcrumb | shadcn | Components | Free | no deps |
