Orbiting Circles
Install: npx shadcn@latest add https://jiguang132.com/r/magic-ui/orbiting-circles.json
Use case
Move child icons around circular orbits.
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 |
|---|---|---|
OrbitingCircles.iconSize (orbiting-circles) | OrbitingCircles child icon dimensions. | examples/orbiting-circles-demo.tsx |
OrbitingCircles.children (orbiting-circles) | Native child content; keep the owning component's text/element constraints. | examples/orbiting-circles-demo.tsx |
OrbitingCircles.radius (orbiting-circles) | Orbit radius in pixels. | examples/orbiting-circles-demo.tsx |
OrbitingCircles.reverse (orbiting-circles) | Reverse the owning effect's motion direction. | examples/orbiting-circles-demo.tsx |
OrbitingCircles.speed (orbiting-circles) | Native animation speed multiplier; not network throughput. | examples/orbiting-circles-demo.tsx |
Interaction and state checks
- Orbiting Circles Demo —
orbiting-circles-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
radius is layout geometry; speed and reverse affect motion. Orbiting brand icons do not establish service integrations.
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
orbiting-circles-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/orbiting-circles
</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>
<Step>Add the required CSS animations</Step>
Add the following animations to your global CSS file.
@theme inline {
--animate-orbit: orbit calc(var(--duration) * 1s) linear infinite;
@keyframes orbit {
0% {
transform: rotate(calc(var(--angle) * 1deg))
translateY(calc(var(--radius) * 1px)) rotate(calc(var(--angle) * -1deg));
}
100% {
transform: rotate(calc(var(--angle) * 1deg + 360deg))
translateY(calc(var(--radius) * 1px))
rotate(calc((var(--angle) * -1deg) - 360deg));
}
}
}
</Steps>
</TabsContent>
</Tabs>
Usage
import { File, Search, Settings } from "lucide-react"
import { OrbitingCircles } from "@/components/ui/orbiting-circles"
<div className="relative h-[500px] w-full overflow-hidden">
<OrbitingCircles>
<File />
<Settings />
<File />
</OrbitingCircles>
<OrbitingCircles radius={100} reverse>
<File />
<Settings />
<File />
<Search />
</OrbitingCircles>
</div>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | The class name for the component |
children | React.ReactNode | - | The children nodes of the component |
reverse | boolean | false | If true, the animation plays in reverse |
duration | number | 20 | The duration of the animation in seconds |
delay | number | 10 | The delay before the animation starts in seconds |
radius | number | 160 | The radius of the orbit in pixels |
path | boolean | true | If true, a path is displayed for the orbit |
iconSize | number | 30 | The size of the icon in pixels |
speed | number | 1 | The speed of the animation |
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.
Orbiting Circles Demo
npx shadcn@latest add https://jiguang132.com/r/magic-ui/examples/orbiting-circles/orbiting-circles-demo.json
Default import: @/components/magicui/examples/orbiting-circles-demo
Dependencies: clsx@2.1.1, tailwind-merge@3.6.0
Minimal usage and theme
import Demo from '@/components/magicui/examples/orbiting-circles-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.
OrbitingCircles({
className,
children,
reverse,
duration = 20,
radius = 160,
path = true,
iconSize = 30,
speed = 1,
...props
}: OrbitingCirclesProps)
export interface OrbitingCirclesProps extends React.HTMLAttributes<HTMLDivElement> {
className?: string
children?: React.ReactNode
reverse?: boolean
duration?: number
delay?: number
radius?: number
path?: boolean
iconSize?: number
speed?: number
}
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.
// OrbitingCircles
duration = 20
// OrbitingCircles
radius = 160
// OrbitingCircles
path = true
// OrbitingCircles
iconSize = 30
// OrbitingCircles
speed = 1
Native and external types
External types remain defined by React or native dependencies, not manually expanded into guessed props. The installed version's TypeScript definitions are authoritative.
React.HTMLAttributes<HTMLDivElement>
HTMLDivElement
React.ReactNode