A small light that travels around any element's border at a steady pace. Subtle, premium, never distracting.
A container whose border carries a light that travels around it.
Customize
Usage
import { OrbitBorder } from "@/components/motionkit/orbit-border";
<OrbitBorder className="w-72">
<h3>Pro plan</h3>
<p>Every component, every update.</p>
</OrbitBorder>Motion
The exact curves this component runs, plotted with Motion's own maths.
Orbit
Runs on its own
Highlighting one option among several, such as the recommended pricing plan, a featured case study or an input that needs attention.
The container has a padding as wide as the border. Behind the content, an oversized conic gradient (mostly transparent, with one bright arc) rotates on a linear loop. Only the thin gap between the edge and the content shows it, so it looks like light travelling round the border.
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-border.jsonnpm install motionSave as components/motionkit/orbit-border.tsx.
"use client";
import type { ReactNode } from "react";
import { motion, useReducedMotion } from "motion/react";
type OrbitBorderProps = {
children?: ReactNode;
/** Seconds per full orbit. */
duration?: number;
/** Color of the travelling light. */
color?: string;
/** Border thickness in pixels. */
width?: number;
className?: string;
};
export function OrbitBorder({
children,
duration = 4,
color = "#5FAEB4",
width = 1,
className = "",
}: OrbitBorderProps) {
const reduceMotion = useReducedMotion();
return (
<div
style={{ padding: width }}
className={`relative isolate overflow-hidden rounded-2xl bg-white/10 ${className}`}
>
{/* an oversized conic gradient spins behind the content; only the border gap shows it */}
<motion.div
aria-hidden
className="absolute left-1/2 top-1/2 -z-10 aspect-square w-[200%] -translate-x-1/2 -translate-y-1/2"
style={{ background: `conic-gradient(from 0deg, transparent 0deg 280deg, ${color} 340deg, transparent 360deg)` }}
animate={reduceMotion ? undefined : { rotate: 360 }}
transition={{ duration, repeat: Infinity, ease: "linear" }}
/>
<div style={{ borderRadius: `calc(1rem - ${width}px)` }} className="h-full bg-[#0C1010] p-6">
{children}
</div>
</div>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
| duration | number | 4 | Seconds per full orbit. |
| color | string | "#5FAEB4" | Color of the travelling light. |
| width | number | 1 | Border thickness in pixels. |
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-border.json in any project with a components.json. It saves the file to components/motionkit and installs its dependencies.
The light stops for reduced-motion users. It loops forever otherwise, so if it sits beside other content for more than 5 seconds, WCAG 2.2.2 asks you to add a pause control.
Give a container padding as wide as the border, then rotate an oversized conic gradient behind its content. Only the thin gap at the edge shows, so it reads as light travelling round the border. That's how this component works.
With reduced motion on, it stops. Otherwise it loops forever, so if it sits beside other content for more than five seconds, WCAG 2.2.2 asks you to add a way to pause it.
A small light that travels around any element's border at a steady pace. Subtle, premium, never distracting.
A card with a soft glow that tracks the pointer across its surface.
A 3D card that tilts toward the pointer, with an optional moving glare.
Pro plan
$12/mo
Every component, every update.