progress
adrianub/progressFreeComponent
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/progress.jsonSource
1import { Component, computed, input, numberAttribute } from '@angular/core'2import { RdxProgressIndicatorDirective, RdxProgressRootDirective } from '@radix-ng/primitives/progress'34import { cn } from '~/lib/utils'56@Component({7 standalone: true,8 selector: '[ubProgress]',9 imports: [RdxProgressIndicatorDirective],10 host: {11 '[class]': 'computedClass()',12 },13 hostDirectives: [14 {15 directive: RdxProgressRootDirective,16 inputs: ['value:progress', 'max', 'valueLabel'],17 },18 ],19 template: `20 <div rdxProgressIndicator class="h-full w-full flex-1 bg-primary transition-all" [style.transform]="'translateX(-' + (100 - (progress() || 0)) + '%)'"></div>21 `,22})23export class ProgressDirective {24 progress = input(0, {25 transform: numberAttribute,26 })2728 class = input<string>()29 computedClass = computed(() => cn('relative h-2 w-full overflow-hidden rounded-full bg-primary/20', this.class()))30}
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 |
