For Tailwind CSS v3 docs, click here.

Animated Circular Progress Bar

Animated Circular Progress Bar is a component that displays a circular gauge with a percentage value.

通过 CLI 安装

npm
pnpm
bun
yarn
npx shadcn-vue@latest add "https://registry.inspira-ui.com/animated-circular-progressbar.json"

手动安装

复制并粘贴以下代码:

AnimatedCircularProgressBar.vue

API

Prop 名称类型默认值描述
classstring-The class to be applied to the component.
maxnumber100The maximum value of the gauge.
minnumber0The minimum value of the gauge.
valuenumber0The current value of the gauge.
gaugePrimaryColorstringrgb(79 70 229)The primary color of the gauge.
gaugeSecondaryColorstringrgba(0, 0, 0, 0.1)The secondary color of the gauge.
circleStrokeWidthnumber10The width of the circle progress bar.
showPercentagebooleantrueShow the value inside the circle
durationnumber1The duration of the animation (in seconds).

感谢