UIPin
ComponentsIconsIllustrationsMotionTemplatesApps
Boards
UIPin

Free, open-source UI components, icons, illustrations, motion, templates and apps, in one search. Every item links to its source and licence.

UIPin is free. If it saved you time, you can keep it running:

Buy me a coffee
ComponentsIconsIllustrationsMotionTemplatesAppsLibrariesCompareNew this weekMCP for agentsBoardsPrivacy

Components, icons and artwork belong to their authors and are shown under their open-source licences.

Magic UI/Orbiting Circles

Backgrounds
Compiling

Theme it

Every preview, live

Brand colour

Corner radius

Font

Recolours shadcn’s tokens, Tailwind’s accent colours and colours set in the code. Red, amber and green classes stay, since they usually mean error, warning or success.

Orbiting Circles

A collection of circles which move in orbit along a circular path

npx shadcn@latest add https://magicui.design/r/orbiting-circles.json
Open in v0 Docs Repo
Library
Magic UI
License
MIT
Stack
React · Tailwind CSS · radix
Packages
@radix-ui/react-icons
Size
72 lines
Demo
From Magic UI

Code

registry/magicui/orbiting-circles.tsx

import React from "react"

import { cn } from "@/lib/utils"

export interface OrbitingCirclesProps extends React.HTMLAttributes<HTMLDivElement> {
  className?: string
  children?: React.ReactNode
  reverse?: boolean
  duration?: number
  delay?: number
  radius?: number
  path?: boolean
  iconSize?: number
  speed?: number
}

export function OrbitingCircles({
  className,
  children,
  reverse,
  duration = 20,
  radius = 160,
  path = true,
  iconSize = 30,
  speed = 1,
  ...props
}: OrbitingCirclesProps) {
  const calculatedDuration = duration / speed
  return (
    <>
      {path && (
        <svg
          xmlns="http://www.w3.org/2000/svg"
          version="1.1"
          className="pointer-events-none absolute inset-0 size-full"
        >
          <circle
            className="stroke-black/10 stroke-1 dark:stroke-white/10"
            cx="50%"
            cy="50%"
            r={radius}
            fill="none"
          />
        </svg>
      )}
      {React.Children.map(children, (child, index) => {
        const angle = (360 / React.Children.count(children)) * index
        return (
          <div
            style={
              {
                "--duration": calculatedDuration,
                "--radius": radius,
                "--angle": angle,
                "--icon-size": `${iconSize}px`,
              } as React.CSSProperties
            }
            className={cn(
              `animate-orbit absolute flex size-(--icon-size) transform-gpu items-center justify-center rounded-full`,
              { "[animation-direction:reverse]": reverse },
              className
            )}
            {...props}
          >
            {child}
          </div>
        )
      })}
    </>
  )
}

More like this

Orbit Rotation

Eldora UI·Backgrounds

Cobe Globe

Eldora UI·Media & 3D

Icon Cloud

Magic UI·Media & 3D

Fireworks Background

Animate UI·BackgroundsMIT+

Grid Pattern

Magic UI·Backgrounds

Animated Grid Pattern

Magic UI·Backgrounds

Hexagon Pattern

Magic UI·Backgrounds

Hexagon Background

Animate UI·BackgroundsMIT+

Bg Animated Fractal Dot Grid

Cult UI·Page sections

8-bit Avatar

8bitcn·Media & 3D

8-bit XP Bar

8bitcn·Feedback & loaders

Dock

Cult UI·Navigation

Carousel

HextaUI·Media & 3D

Glyph Matrix

Magic UI·Cursor & effects

Carousel

shadcn/ui·Media & 3D