A seamless infinite scroller for logos and testimonials that pauses on hover.
Icons, labels and shapes circling a central logo on rings, each with its own speed and direction.
Customize
Usage
import { Orbit } from "@/components/motionkit/orbit";
<Orbit
center={<Logo />}
rings={[
{ radius: 62, duration: 20, items: [<MailIcon />, <SearchIcon />, <FilesIcon />] },
{ radius: 108, duration: 32, reverse: true, items: [<DeployIcon />, <MediaIcon />, <SettingsIcon />] },
]}
/>Motion
The exact curves this component runs, plotted with Motion's own maths.
Inner ring lap
Runs on its own
Outer ring lap
Runs on its own
Integration and partner sections, ecosystem diagrams and "works with" heroes around a central logo.
Each ring rotates with a CSS animation, and every item on it counter-rotates at the same speed, so labels stay upright as they travel. CSS animations rather than Motion let the orbits pause mid-lap on hover and carry on from the same spot.
Works in the App Router as is. Requires Tailwind CSS v4.
One command adds the file and installs its dependencies. Needs a components.json (run npx shadcn@latest init once if you don't have one).
npx shadcn@latest add https://www.motionkitui.com/r/orbit.jsonnpm install motionSave as components/motionkit/orbit.tsx.
"use client";
import { useState, type CSSProperties, type ReactNode } from "react";
import { useReducedMotion } from "motion/react";
export type OrbitRing = {
/** Things that circle on this ring: icons, labels or little shapes. */
items: ReactNode[];
/** Distance from the centre in pixels. */
radius: number;
/** Seconds for one full lap. */
duration?: number;
/** Travel anticlockwise instead of clockwise. */
reverse?: boolean;
};
type OrbitProps = {
/** What everything circles around, e.g. a logo. */
center?: ReactNode;
rings: OrbitRing[];
/** Freeze the orbits while the pointer is over them. */
pauseOnHover?: boolean;
className?: string;
};
export function Orbit({ center, rings, pauseOnHover = true, className = "" }: OrbitProps) {
const reduceMotion = useReducedMotion();
const [paused, setPaused] = useState(false);
const size = (Math.max(...rings.map((ring) => ring.radius), 0) + 32) * 2;
const moving = !reduceMotion && !paused;
return (
<div
onPointerEnter={pauseOnHover ? () => setPaused(true) : undefined}
onPointerLeave={pauseOnHover ? () => setPaused(false) : undefined}
style={{ width: size, height: size }}
className={`relative ${className}`}
>
{/* the individual rotate property spins without disturbing each element's translate */}
<style>{"@keyframes motionkit-orbit{to{rotate:360deg}}@keyframes motionkit-orbit-reverse{to{rotate:-360deg}}"}</style>
{rings.map((ring, r) => (
<Ring key={r} ring={ring} moving={moving} />
))}
<div className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2">{center}</div>
</div>
);
}
function Ring({ ring, moving }: { ring: OrbitRing; moving: boolean }) {
const { items, radius, duration = 20, reverse = false } = ring;
// CSS animations, not Motion: they can pause mid-lap and carry on from the same spot
const spin = (backwards: boolean): CSSProperties => ({
// longhands only: React warns when the animation shorthand and play-state are mixed
animationName: backwards ? "motionkit-orbit-reverse" : "motionkit-orbit",
animationDuration: `${duration}s`,
animationTimingFunction: "linear",
animationIterationCount: "infinite",
animationPlayState: moving ? "running" : "paused",
});
return (
<>
<div
aria-hidden
className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-dashed border-white/10"
style={{ width: radius * 2, height: radius * 2 }}
/>
<ul className="absolute inset-0" style={spin(reverse)}>
{items.map((item, index) => {
const angle = (index / items.length) * 360;
return (
<li
key={index}
className="absolute left-1/2 top-1/2"
style={{ transform: `rotate(${angle}deg) translateX(${radius}px) rotate(${-angle}deg)` }}
>
{/* spins the other way at the same speed, so items stay upright as they travel */}
<div className="-translate-x-1/2 -translate-y-1/2" style={spin(!reverse)}>
{item}
</div>
</li>
);
})}
</ul>
</>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
| center | ReactNode | — | What everything circles around, e.g. a logo. |
| rings | { items, radius, duration?, reverse? }[] | — | Each ring's items, distance from the centre, seconds per lap and direction. |
| pauseOnHover | boolean | true | Freeze the orbits while the pointer is over them. |
How we audit: the WCAG 2.2 animation checklist and respecting reduced motion in React.
Yes. The file starts with "use client", so you can import it straight into a Server Component page or layout. It works in Vite as is, and in Astro as a React island.
Only the motion package, beside React and Tailwind CSS v4. There is no MotionKit package and no Tailwind config to add.
Yes. Run npx shadcn@latest add https://www.motionkitui.com/r/orbit.json in any project with a components.json. It saves the file to components/motionkit and installs its dependencies.
Rings hold still for reduced-motion users, and pause on hover by default. Without a pointer there is no pause, so add your own control if it sits beside content for more than 5 seconds (WCAG 2.2.2).
A seamless infinite scroller for logos and testimonials that pauses on hover.
A line that draws itself through your steps when the section scrolls into view, with a dot of light travelling along it.
Types a phrase, pauses, backspaces and types the next, with a human rhythm and a caret that blinks only at rest.