A slow-drifting night sky with twinkling stars, for space, launch and AI product heroes.
Thin orbits tipped back in 3D around a glowing core, each with a small light travelling along it. Pure CSS.
Customize
Usage
import { OrbitalRings } from "@/components/motionkit/orbital-rings";
<OrbitalRings
className="h-[32rem] rounded-3xl"
>
<h1>Your headline</h1>
</OrbitalRings>Motion
The exact curves this component runs, plotted with Motion's own maths.
Light orbits
Runs on its own
Fintech and payments, space and science, platforms that connect many parts, and hero sections that need a calm focal point.
Each ring is a circle tipped back with a 3D rotation inside a perspective container, which turns it into an ellipse. Inside each ring, a child rotates continuously with a CSS animation, carrying a small glowing dot round the ring's edge. Outer rings rotate more slowly and each leans slightly differently, so the system reads as 3D. There's no JavaScript running at all.
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/orbital-rings.jsonnpm install motionSave as components/motionkit/orbital-rings.tsx.
"use client";
import type { CSSProperties, ReactNode } from "react";
type OrbitalRingsProps = {
children?: ReactNode;
/** Colour of the orbiting lights and the core's glow. */
color?: string;
/** Number of rings, 2 to 6. */
rings?: number;
/** Seconds for the innermost light to go round once; outer ones take longer. 0 holds them still. */
duration?: number;
/** How far the orbits are tipped back, in degrees. */
tilt?: number;
className?: string;
};
/**
* Thin elliptical orbits tipped back in 3D perspective around a softly glowing core, each with a small light
* travelling along it, the outer ones slower, like a calm diagram of a system in motion. Pure CSS, so it costs
* almost nothing to run, and the lights hold still for reduced motion.
*/
export function OrbitalRings({ children, color = "#B9C7FF", rings = 4, duration = 10, tilt = 72, className = "" }: OrbitalRingsProps) {
const count = Math.min(6, Math.max(2, Math.round(rings)));
return (
<div className={`relative isolate overflow-hidden bg-[#0C1010] ${className}`}>
<style>{`
@keyframes mk-orbit { from { transform: rotateZ(0deg); } to { transform: rotateZ(360deg); } }
@media (prefers-reduced-motion: reduce) { .mk-orbit { animation: none !important; } }
`}</style>
<div aria-hidden className="pointer-events-none absolute inset-0 -z-10 grid place-items-center [perspective:1000px]">
{/* the core */}
<div className="absolute size-9 rounded-full" style={{ background: `radial-gradient(circle at 35% 30%, color-mix(in oklab, ${color} 85%, white), color-mix(in oklab, ${color} 45%, #0C1010) 55%, #0C1010 100%)`, boxShadow: `0 0 50px 8px color-mix(in oklab, ${color} 22%, transparent), inset 0 0 0 1px rgb(255 255 255 / 0.12)` }} />
{Array.from({ length: count }, (_, i) => {
const size = 34 + i * (60 / count);
const seconds = duration * (1 + i * 0.55);
// each light starts a different share of the way round (about 100° apart), so they never bunch up
const offset = ((i * 0.28 + 0.05) % 1) * seconds;
// each ring leans a little differently, so the system reads as 3D rather than flat
const lean = (i - (count - 1) / 2) * 7;
return (
<div
key={i}
className="absolute aspect-square [transform-style:preserve-3d]"
style={{ width: `${size}%`, transform: `rotateX(${tilt}deg) rotateY(${lean}deg)` } as CSSProperties}
>
<div className="absolute inset-0 rounded-full border" style={{ borderColor: `color-mix(in oklab, ${color} ${22 - i * 2}%, transparent)` }} />
<div
className="mk-orbit absolute inset-0"
style={{
// a negative delay starts each light part-way round, so they're spread out; when still, the same
// spread comes from a fixed angle instead
animation: duration ? `mk-orbit ${seconds}s linear ${-offset}s infinite` : undefined,
transform: `rotateZ(${((i * 0.28 + 0.05) % 1) * 360}deg)`,
}}
>
<span
className="absolute left-1/2 top-0 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full"
style={{ background: color, boxShadow: `0 0 12px 3px color-mix(in oklab, ${color} 60%, transparent)` }}
/>
</div>
</div>
);
})}
</div>
<div aria-hidden className="pointer-events-none absolute inset-0 -z-10 bg-[radial-gradient(ellipse_at_center,transparent_45%,#0C1010_100%)]" />
{children}
</div>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
| color | string | "#B9C7FF" | Colour of the lights and the core's glow. |
| rings | number | 4 | Number of rings, 2 to 6. |
| duration | number | 10 | Seconds for the innermost light to orbit; 0 holds them still. |
| tilt | number | 72 | How far the orbits are tipped back, in degrees. |
| children | ReactNode | — | Your content, layered above. |
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.
Nothing beyond 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/orbital-rings.json in any project with a components.json. It saves the file to components/motionkit and installs its dependencies.
With reduced motion on, the lights hold still at spread-out positions.
A slow-drifting night sky with twinkling stars, for space, launch and AI product heroes.
A retro perspective grid rolling toward a glowing horizon, synthwave style.
A sea of dots on a 3D plane rolling in slow waves to the horizon, swelling up around the cursor.