label
shadcn-solidjs/labelFreeComponent
shadcn-solidjs publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn-solidjs on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://shadcn-solidjs.com/r/label.jsonSource
1import type { PolymorphicProps } from "@kobalte/core";2import { Polymorphic } from "@kobalte/core";34import { cn } from "~/lib/utils.ts";5import type { ComponentProps, ValidComponent } from "solid-js";67import { splitProps } from "solid-js";89type LabelProps<T extends ValidComponent = "label"> = ComponentProps<T> & {10 class?: string | undefined;11};1213const Label = <T extends ValidComponent = "label">(14 props: PolymorphicProps<T, LabelProps<T>>,15) => {16 const [local, others] = splitProps(props as LabelProps, ["class"]);1718 return (19 <Polymorphic<LabelProps>20 as="label"21 data-slot="label"22 class={cn(23 "gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 peer-data-disabled:opacity-50 flex select-none items-center peer-disabled:cursor-not-allowed group-data-[disabled=true]:pointer-events-none peer-data-disabled:cursor-not-allowed",24 local.class,25 )}26 {...others}27 />28 );29};3031export { Label };
What it pulls in
npm packages
More from shadcn-solidjs
All 85 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn-solidjs | Components | Free | 1 dep | |
| alertalert | shadcn-solidjs | Components | Free | 2 deps | |
| alert-dialogalert-dialog | shadcn-solidjs | Components | Free | 2 deps | |
| aspect-ratioaspect-ratio | shadcn-solidjs | Components | Free | no deps | |
| attachmentattachment | shadcn-solidjs | Components | Free | 2 deps | |
| avataravatar | shadcn-solidjs | Components | Free | 1 dep | |
| badgebadge | shadcn-solidjs | Components | Free | 2 deps | |
| breadcrumbbreadcrumb | shadcn-solidjs | Components | Free | 1 dep |
