label
adrianub/labelFreeComponent
adrianub publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by adrianub on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.adrianub.dev/r/styles/new-york/label.jsonSource
1import { computed, Directive, input } from '@angular/core'23import { RdxLabelDirective } from '@radix-ng/primitives/label'4import { cva } from 'class-variance-authority'56import { cn } from '~/lib/utils'78const labelVariants = cva(9 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',10)1112@Directive({13 selector: '[ubLabel]',14 standalone: true,15 hostDirectives: [16 {17 directive: RdxLabelDirective,18 inputs: ['htmlFor'],19 },20 ],21 host: {22 '[class]': 'computedClass()',23 },24})25export class UbLabelDirective {26 readonly class = input<string>('')27 protected computedClass = computed(() => cn(labelVariants(), this.class()))28}
What it pulls in
npm packages
Files it writes
More from adrianub
All 23 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | adrianub | Components | Free | 1 dep | |
| alertalert | adrianub | Components | Free | no deps | |
| aspect-ratioaspect-ratio | adrianub | Components | Free | 1 dep | |
| avataravatar | adrianub | Components | Free | 1 dep | |
| badgebadge | adrianub | Components | Free | no deps | |
| breadcrumbbreadcrumb | adrianub | Components | Free | no deps | |
| buttonbutton | adrianub | Components | Free | no deps | |
| cardcard | adrianub | Components | Free | no deps |
