# Orbit Border

> A container whose border carries a light that travels around it.

Category: Cards · Free · Updated 2026-11-14 · Live demo: https://www.motionkitui.com/components/orbit-border

## When to use it

Highlighting one option among several, such as the recommended pricing plan, a featured case study or an input that needs attention.

## How it works

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.

## Installation

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

Or copy `components/motionkit/orbit-border.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 |
| --- | --- | --- | --- |
| `duration` | `number` | `4` | Seconds per full orbit. |
| `color` | `string` | `"#5FAEB4"` | Color of the travelling light. |
| `width` | `number` | `1` | Border thickness in pixels. |

## Accessibility

- **Keyboard: Not applicable.** A static container with nothing to focus.
- **Screen readers: Pass.** The travelling light is hidden from assistive tech.
- **Reduced motion: Partial.** 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.
- **Colour contrast: Not applicable.** Decorative border only. Contrast depends on the content you place inside.

## Source

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