Animated Circular Progress Bar
Install: npx shadcn@latest add https://jiguang132.com/r/magic-ui/animated-circular-progress-bar.json
Use case
Animate a circular gauge for a host-provided value.
Native props used by the examples
Extracted from all local examples for this entry, grouped by imported module and native owner, including other Magic components used by compound demos. This is not an exhaustive API or a universal host variant. Inspect spread object declarations and the source types/defaults below.
| Owning component prop | Explanation | Example source |
|---|---|---|
AnimatedCircularProgressBar.value (animated-circular-progress-bar) | Host-provided numeric target/progress; the component does not fetch it. | examples/animated-circular-progress-bar-demo.tsx |
AnimatedCircularProgressBar.gaugePrimaryColor (animated-circular-progress-bar) | Color of the progress gauge's filled portion. | examples/animated-circular-progress-bar-demo.tsx |
AnimatedCircularProgressBar.gaugeSecondaryColor (animated-circular-progress-bar) | Color of the progress gauge's remaining portion. | examples/animated-circular-progress-bar-demo.tsx |
Interaction and state checks
- Animated Circular Progress Bar Demo —
animated-circular-progress-bar-demo
These names identify real example entries, not new component props or extra components. Check pointer/keyboard behavior, themes, small screens and failures for the selected example. Decorative effects must not invent disabled/error/submission states. Complete example installation includes the actual dependency closure.
Business integration boundary
Provide value within min/max and an accessible label. The gauge does not track uploads or tasks itself.
Host and motion setup
Initialize Tailwind CSS v4, semantic CSS variables and the dark variant; import the independent local Registry namespace. Reuse an existing next-themes Provider without substituting JGuang UI/Base UI/HeroUI APIs. Mount effects in view and unmount offscreen; provide static alternatives for unavailable Canvas/WebGL or failed remote media. Respect prefers-reduced-motion and verify timer/RAF/observer/listener cleanup: stopping CSS alone does not prove the engine stopped. Examples provide no backend, login, payment or real AI stream. This practical guide is bilingual; detailed upstream references and demo text retain their original language.
Available examples
animated-circular-progress-bar-demo
Demo state and mock data do not provide a backend service. Inspect the component props before wiring real data.
Installation
<Tabs defaultValue="cli"> <TabsList> <TabsTrigger value="cli">CLI</TabsTrigger> <TabsTrigger value="manual">Manual</TabsTrigger> </TabsList> <TabsContent value="cli">npx shadcn@latest add @magicui/animated-circular-progress-bar
</TabsContent>
<TabsContent value="manual">
<Steps>
<Step>Copy and paste the following code into your project.</Step>
<Step>Update the import paths to match your project setup.</Step>
</Steps> </TabsContent> </Tabs>Usage
import { AnimatedCircularProgressBar } from "@/components/ui/animated-circular-progress-bar"
<AnimatedCircularProgressBar />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | The class name to be applied to the component |
max | number | 100 | The maximum value of the gauge |
min | number | 0 | The minimum value of the gauge |
value | number | 0 | The current value of the gauge |
gaugePrimaryColor | string | - | The primary color of the gauge |
gaugeSecondaryColor | string | - | The secondary color of the gauge |
Credits
- Credit to @luis-code
Complete example installation
The component command installs the component. Each example command also includes its actual imported components, native support UI, utilities and pinned dependencies. Helpers are not additional catalog components.
Animated Circular Progress Bar Demo
npx shadcn@latest add https://jiguang132.com/r/magic-ui/examples/animated-circular-progress-bar/animated-circular-progress-bar-demo.json
Default import: @/components/magicui/examples/animated-circular-progress-bar-demo
Dependencies: clsx@2.1.1, tailwind-merge@3.6.0
Minimal usage and theme
import Demo from '@/components/magicui/examples/animated-circular-progress-bar-demo';
import { ThemeProvider } from 'next-themes';
export default function Example() {
return <ThemeProvider attribute="class" defaultTheme="system" enableSystem><Demo /></ThemeProvider>;
}
Initialize Tailwind CSS v4, semantic color variables and the dark variant first. Reuse an existing next-themes provider rather than nesting another. Next Link examples require a Next.js environment; in static Vite projects adapt the demo links to your router without changing the native component API. Some media and tweets require network access. Examples do not supply authentication or backend services.
Source-backed parameter reference
Implementation signatures and types are generated from the pinned local source. Optional props, native inherited types, union branches and never exclusions are preserved. A forwardRef implementation's ref is a React reference, not an additional business prop.
AnimatedCircularProgressBar({
max = 100,
min = 0,
value = 0,
gaugePrimaryColor,
gaugeSecondaryColor,
className,
}: AnimatedCircularProgressBarProps)
interface AnimatedCircularProgressBarProps {
max?: number
min?: number
value: number
gaugePrimaryColor: string
gaugeSecondaryColor: string
className?: string
}
Destructuring defaults in source
Only defaults written directly in parameter/props destructuring are listed. Conditional expressions, runtime theme and computed values require source inspection; this is not an exhaustive behavior-default list.
// AnimatedCircularProgressBar
max = 100
// AnimatedCircularProgressBar
min = 0
// AnimatedCircularProgressBar
value = 0