Progress ring
Shows how much of an RO is allocated. Used in the table progress column and on mobile cards.
Open in FigmaUsage
import { ProgressRing, ProgressCell } from '@pilar-amoda/ui/progress-ring';Progress ring
value from 0 to 100. 32 × 32, ring 28 with a 4 px stroke: track progress-track, value progress (round cap, starts at 12 o'clock, clockwise). role=progressbar; give it an aria-label when it stands alone.
import { ProgressRing } from '@pilar-amoda/ui/progress-ring';
const values = [0, 25, 40, 50, 75, 100] as const;
/** Every value drawn in Figma. */
export const ProgressRingValues = () => (
<>
{values.map((value) => (
<ProgressRing key={value} value={value} aria-label={`${String(value)}% teralokasi`} />
))}
</>
);Progress cell
Table column "Progres": ring + two lines (xs/medium foreground, xs/regular muted-foreground), gap 10. Props value, allocated and total; label and detail override the two lines.
40% teralokasi6/10 item sisa
100% teralokasi0/8 item sisa
import { ProgressCell } from '@pilar-amoda/ui/progress-ring';
/** Table column "Progres": ring + percentage + items left. */
export const ProgressRingCell = () => (
<>
<ProgressCell value={40} allocated={4} total={10} />
<ProgressCell value={100} allocated={8} total={8} />
</>
);Do and don't
Do: pair the ring with a text value (40% teralokasi).
Don't: show the ring alone without a number.