Skip to content

ProgressCircle

Used to display a task’s progress in a circular form.

import {
useEffect,
useState,
} from 'react';
import { ProgressCircle } from '@fintech-sandpit/ui/react';
const [value, setValue] = useState(51);
// Your logic to update the value goes here
// For example, you can use a timer to update the value every second
useEffect(() => {
() => {
const timer = setInterval(() => {
if (value < 100) {
setValue(value + 1);
}
}, 1000);
return () => {
clearInterval(timer);
};
},
[
value,
],
);
return (
<ProgressCircle
colorScheme="primary"
value={value}
bordered
withText
/>
);
import { ProgressCircle } from '@fintech-sandpit/ui/react';
return (
<ProgressCircle defaultValue={null} />
);
NameTypeRequiredDefaultDescription
valuenumber | nullControlled progress value, between 0 and 100 1
defaultValuenumber | nullUncontrolled progress value, between 0 and 100 1
colorSchemeColorSchemeneutralProgress bar color scheme
sizeSizemdProgress bar size
boxSizeCssUnitProgress bar box size 2
thicknessCssUnitProgress bar thickness 3
withTextbooleanfalseWhether to show a value inside the circle
  1. If value is null, the progress will be indeterminate, causing the progress circle to spin indefinitely.
  2. If provided, the size prop will be ignored.
  3. Makes sense only if box size is provided.
type ColorScheme = 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger'
type CssUnit = `${number}${'px' | 'em' | 'rem' | 'vw' | 'vh' | 'vmin' | 'vmax' | '%'}`
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl'