Progress Item
progress-itemuiLabeled progress row — item name on the left, progress bar in the middle, percent or count on the right. Use for batched task lists, file upload queues, or onboarding checklists.
Installation
$pnpm dlx uipkge-ng@latest add progress-item$npx uipkge-ng@latest add progress-item$yarn dlx uipkge-ng@latest add progress-item$bunx uipkge-ng@latest add progress-itemManifest:
https://uipkge.dev/r/angular/progress-item.jsonInstalls to:src/app/components/ui/progress-item/Examples
Loading interactive previews…
Loading interactive previews…
Props
| Name | Type / Values | Default | Required |
|---|---|---|---|
label | string | — | optional |
value | number | 0 | optional |
secondaryLabel | string | — | optional |
barClass | string | — | optional |
colorIndex | number | — | optional |
class | string | — | optional |
Includes
Used by
Files installed (2)
src/app/components/ui/progress-item/progress-item.component.ts2 kB
import { Component, Input, ChangeDetectionStrategy } from '@angular/core' import { cn } from '@/lib/utils' import { UiProgressComponent } from '@/ui/progress/progress.component' // Maps to canonical shadcn chart tokens (chart-1..5). Cycles through 5 hues. const barColors = [ '[&_[data-slot=progress-indicator]]:bg-primary', '[&_[data-slot=progress-indicator]]:bg-[var(--chart-1)]', '[&_[data-slot=progress-indicator]]:bg-[var(--chart-2)]', '[&_[data-slot=progress-indicator]]:bg-[var(--chart-3)]', '[&_[data-slot=progress-indicator]]:bg-[var(--chart-4)]', '[&_[data-slot=progress-indicator]]:bg-[var(--chart-5)]', ] /** * Angular port of UIPKGE ProgressItem (React `ProgressItem`). Labeled progress row — item * name on the left, percent (or `secondaryLabel`) on the right, a `ui-progress` bar below. * `colorIndex` cycles the indicator through the chart tokens; `barClass` wins over it. */ @Component({ changeDetection: ChangeDetectionStrategy.Eager, selector: 'ui-progress-item, [ui-progress-item]', standalone: true, imports: [UiProgressComponent], host: { '[attr.data-uipkge]': '""', '[attr.data-slot]': '"progress-item"', '[class]': 'hostClass', }, template: ` <div class="flex items-center justify-between text-sm"> <span class="font-medium">{{ label }}</span> <span class="text-muted-foreground text-xs tabular-nums">{{ secondaryLabel ?? value + '%' }}</span> </div> <ui-progress [value]="value" [class]="progressClass" /> `, }) export class UiProgressItemComponent { @Input() label = '' @Input() value = 0 @Input() secondaryLabel?: string @Input() barClass?: string @Input() colorIndex?: number @Input('class') className?: string get colorClass(): string { return this.colorIndex !== undefined ? barColors[this.colorIndex % barColors.length]! : '' } get hostClass(): string { return cn('block group/progress space-y-1.5', this.className) } get progressClass(): string { return cn('h-2 transition-colors duration-200', this.colorClass, this.barClass) } }src/app/components/ui/progress-item/index.ts0.1 kB
export { UiProgressItemComponent } from './progress-item.component'
Raw manifest:https://uipkge.dev/r/angular/progress-item.json