GitHub

Twin orbit

Two orbiting markers for a balanced circular loading animation.

TwinOrbit is a compact loader built from one center dot and two markers that orbit in a half-cycle offset. The balanced motion makes it a good fit for pairing, matching, comparison, replication, or reconciliation states where a single-direction spinner feels too generic.

Loading
import { TwinOrbit } from "@/components/loading-ui/twin-orbit";

export function TwinOrbitDemo() {

Installation

pnpm dlx shadcn@latest add @loading-ui/twin-orbit

Usage

import { TwinOrbit } from "@/components/loading-ui/twin-orbit";
<TwinOrbit />

Customization

TwinOrbit uses currentColor and scales from the element size. Because the orbiting markers travel outside the center dot, leave a little more horizontal space than the declared size-* utility suggests.

Size

Small sizes work well inline, while larger dots can anchor compact panel or status-row loading states.

LoadingLoadingLoading
import { TwinOrbit } from "@/components/loading-ui/twin-orbit";

export function TwinOrbitSize() {

Color

The center and orbiting markers inherit currentColor, so color can come from the surrounding shadcn component or a direct text color utility.

LoadingLoadingLoading
import { TwinOrbit } from "@/components/loading-ui/twin-orbit";

export function TwinOrbitColor() {

Duration

Set --duration to tune the pace. The second marker stays half a cycle behind so the orbit remains balanced at slower and faster speeds.

LoadingLoadingLoading
import { TwinOrbit } from "@/components/loading-ui/twin-orbit";

export function TwinOrbitDuration() {