Orbiting Circles for React
OrbitingCircles is a React effect that spins icons or avatars around a centre on rings, using transform only. Use it for integration sections; it holds still on hover and focus and is static under reduced motion.
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/orbiting-circles.jsonCore
- A
- B
- C
- D
- E
- F
OrbitingCircles
Two rings
Stack rings with different radius, duration, reverse and startAngle around a central card. Give the ring a label when the items mean something: it then becomes a labelled list. Glass items use level-2 glass; keep a handful in view.
Core
- A
- B
- C
- D
- E
- F
import { useState } from "react";
import { GlassCard } from "@/components/sheenui/glass-card/glass-card";
import { OrbitingCircles } from "@/components/sheenui/orbiting-circles/orbiting-circles";
import { Switch } from "@/components/sheenui/switch/switch";
// Package build (after the first npm release, or a packed tarball): import { GlassCard, OrbitingCircles, Switch } from "@sheenui/theme";
// This example also uses glass-card, switch: npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/glass-card.json https://lokendra-builds.github.io/sheenui/r/switch.json
const GLYPHS = ["A", "B", "C", "D", "E", "F"];
function Glyph({ children }: { children: string }) {
return <span className="glass-2 grid size-10 place-items-center rounded-full text-sm font-semibold">{children}</span>;
}
export function Example() {
const [paused, setPaused] = useState(false);
return (
<>
<Switch label="Pause" checked={paused} onCheckedChange={setPaused} />
<div className="relative grid size-[22rem] place-items-center">
<GlassCard tint className="relative grid size-20 place-items-center text-sm font-semibold">Core</GlassCard>
<OrbitingCircles label="Inner integrations" radius={96} duration={24} paused={paused}>
{GLYPHS.slice(0, 3).map((g) => (
<Glyph key={g}>{g}</Glyph>
))}
</OrbitingCircles>
<OrbitingCircles label="Outer integrations" radius={160} duration={36} reverse startAngle={30} paused={paused}>
{GLYPHS.slice(3).map((g) => (
<Glyph key={g}>{g}</Glyph>
))}
</OrbitingCircles>
</div>
</>
);
}Files to copy
5 folders · 4 files · 4 packages
- From
theme/src/ components/orbiting-circles/hooks/{use-media-query.ts, use-preferences.ts}motion/gate.tslib/cn.tsstyles/
- shadcn CLI
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/orbiting-circles.jsonRegistry item: orbiting-circles. The styles need the Tailwind v4 glass UI setup.- The examples also use
components/glass-card/components/switch/hooks/{use-direction.ts, use-latest.ts}motion/{light-follower.ts, tokens.ts}lib/{field-control-shell.tsx, form.ts, heading.ts, motion-props.ts, state-light.tsx}
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/glass-card.json https://lokendra-builds.github.io/sheenui/r/switch.json- Packages
pnpm add @base-ui/react clsx motion tailwind-merge
Props
Keyboard
Accessibility
- Without label the ring is decorative and aria-hidden; never put interactive items in a hidden ring. With label it is a labelled list with one item per child, in order.
- pauseOnHover holds the ring while the pointer or focus is on an item; paused gives a page a stop control (WCAG 2.2.2). It also rests off-screen and in hidden tabs.
- Reduced motion: the items rest on the ring, still, in the same places.
- Two transform rotations per item on the compositor (the ring turns, the item turns back); nothing blurs, masks or filters the items.
When to use the orbiting circles effect
- Use it in a works-with or integrations section: logos circling your product mark on one or two rings.
- Stack rings with different radius, duration, reverse and startAngle for a system of orbits around a central glass card.
- Pass label when the items mean something so the ring becomes a labelled list; without it the ring is decorative and hidden.
- Skip it when people must click items quickly; it holds still on hover and focus, but a static grid is easier to use.
- Pair it with GlassCard in the centre, Avatar for team members and itemClassName for glass items.
Frequently asked questions
Related pages
19 effects pages in all: browse them on All effects.
By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .