Progress
Progress composes Base UI progress primitives with Density size and emphasis attributes. Secondary retains the neutral filled track, while outline leaves its track transparent and draws a border.
import { Progress } from "density-base-ui";
export default function ProgressExample() {
return (
<div style={{ width: "100%" }}>
<Progress aria-label="Import progress" value={64} />
</div>
);
}Value
Determinate
Indeterminate
import { Progress, View } from "density-base-ui";
export default function ProgressValueExample() {
return (
<View gap="xl" layout="grid" padding={false} style={{ width: "100%" }}>
<Progress label="Determinate" showValue value={64} />
<Progress label="Indeterminate" value={null} />
</View>
);
}Emphasis
Primary
Secondary
Outline
Ghost primary
import { Progress, View } from "density-base-ui";
export default function ProgressEmphasisExample() {
return (
<View gap="xl" layout="grid" padding={false} style={{ width: "100%" }}>
<Progress emphasis="primary" label="Primary" value={64} />
<Progress emphasis="secondary" label="Secondary" value={64} />
<Progress emphasis="outline" label="Outline" value={64} />
<Progress emphasis="ghost-primary" label="Ghost primary" value={64} />
</View>
);
}Size
2xs
xs
sm
md
lg
xl
2xl
3xl
import { Progress, View } from "density-base-ui";
export default function ProgressSizeExample() {
return (
<View gap="xl" layout="grid" padding={false} style={{ width: "100%" }}>
<Progress label="2xs" size="2xs" value={64} />
<Progress label="xs" size="xs" value={64} />
<Progress label="sm" size="sm" value={64} />
<Progress label="md" size="md" value={64} />
<Progress label="lg" size="lg" value={64} />
<Progress label="xl" size="xl" value={64} />
<Progress label="2xl" size="2xl" value={64} />
<Progress label="3xl" size="3xl" value={64} />
</View>
);
}| Prop | Values | Required | Default | Behavior | Description |
|---|---|---|---|---|---|
emphasis | primary, secondary, outline, ghost-primary, ghost-secondary, ghost-tertiary | Not required | — | Attribute: data-dn-emphasis | — |
label | React.ReactNode | Not required | — | — | — |
showValue | false, true | Not required | false | — | — |
size | 2xs, xs, sm, md, lg, xl, 2xl, 3xl | Not required | — | Attribute: data-dn-size | — |
This component also accepts props from native APIs. They are passed through and intentionally kept out of this focused Density API table.