# Orbit

> Icons, labels and shapes circling a central logo on rings, each with its own speed and direction.

Category: Layout · Free · Updated 2026-10-20 · Live demo: https://www.motionkitui.com/components/orbit

## When to use it

Integration and partner sections, ecosystem diagrams and "works with" heroes around a central logo.

## How it works

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.

## Installation

```bash
npx shadcn@latest add https://www.motionkitui.com/r/orbit.json
```

Or copy `components/motionkit/orbit.tsx` below. Requires react, motion and Tailwind CSS v4. Free for personal projects; commercial use needs MotionKit Plus (https://www.motionkitui.com/pricing).

## Props

| 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. |

## Accessibility

- **Keyboard: Pass.** Items keep their normal tab order if they are links. Hovering pauses the rings, so they are easy to click.
- **Screen readers: Pass.** Each ring is a list, read in order. The ring outlines are hidden from assistive tech.
- **Reduced motion: Partial.** 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).
- **Colour contrast: Pass.** Set by the items you pass in.

## Source

```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>
    </>
  );
}
```
