A bar for quotas, goals and uploads. Leave out value for a busy bar.
import { Progress } from "@kivu-ui/react"On this page
import { Progress } from "@kivu-ui/react";import { Progress } from "@kivu-ui/react";
export default function Demo() {
return (
<div className="grid w-full max-w-sm gap-5">
<Progress label="Storage" value={6.4} max={10} showValue formatValue={(v, max) => `${v} of ${max} GB`} />
<Progress label="Monthly goal" value={82} showValue tone="success" />
<Progress label="API quota" value={96} showValue tone="danger" size="sm" />
<Progress label="Uploading" />
</div>
);
}Extends <div> attributes.
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | - | Current value. Omit for indeterminate. |
max | number | 100 | Maximum. |
label | ReactNode | - | Label above the bar. |
showValue | boolean | false | Show the value beside the label. |
formatValue | (value, max) => string | - | Custom value text, also read by screen readers. |
tone | "primary" | "accent" | "success" | "danger" | "primary" | Colour. |
size | "sm" | "md" | "lg" | "md" | Controls the size. |
Every component also accepts className and forwards its ref. Root CSS class: .kivu-progress