Progress Circle

A Progress Circle shows how far along a task is as a ring rather than a bar, which fits a tile, a button or a dense row where a full-width bar would not. Left without a value it spins as an indeterminate indicator.

Demo

Rendered live, with the same build of the library you install.

Colors and sizes:

Indeterminate:

Usage

ProgressCircle.tsx
import { NProgressCircle } from '@nayan-ui/react';
const ProgressCircle = () => {
return (
<div>
<h3 className="text-foreground mb-2 mt-4 text-sm font-semibold">Colors and sizes:</h3>
<div className="mb-5 flex flex-wrap items-center gap-5">
<NProgressCircle value={25} aria-label="Upload" />
<NProgressCircle value={60} color="success" size="lg" aria-label="Sync" />
<NProgressCircle value={90} color="warning" size="sm" aria-label="Disk" />
</div>
<h3 className="text-foreground mb-2 mt-4 text-sm font-semibold">Indeterminate:</h3>
<NProgressCircle isIndeterminate aria-label="Working" />
</div>
);
};
export default ProgressCircle;

Attributes

10 props
NameTypeDefaultDetails
valuenumberOptionalThe value prop.
minValuenumber0The minValue prop.
maxValuenumber100The maxValue prop.
isIndeterminatebooleanfalseOmit `value` for an indeterminate circle.
color'default' | 'accent' | 'success' | 'warning' | 'danger''accent'The color prop.
size'sm' | 'md' | 'lg''md'The size prop.
childrenReactNodeOptionalRendered in the middle of the circle — a percentage, a count, an icon.
classNamestring''The className prop.
trackClassNamestring''The trackClassName prop.
aria-labelstring'Progress'The aria-label prop.

Tags

Other components solving nearby problems.