Orbiting Circles
svelte-animations/orbiting-circlesFreeBlock
A component that displays icons or elements orbiting in a circular path with customizable radius, duration, and direction.
Install it
npx shadcn@latest add https://sv-animations.vercel.app/r/orbiting-circles.jsonSource
1<script lang="ts">2 import { cn } from "$UTILS$";3 import type { Snippet } from "svelte";4 import type { HTMLAttributes } from "svelte/elements";56 interface OrbitingCirclesProps extends HTMLAttributes<HTMLDivElement> {7 children: Snippet;8 class?: string;9 reverse?: boolean;10 duration?: number;11 radius?: number;12 path?: boolean;13 iconSize?: number;14 speed?: number;15 angle?: number;16 delay?: number;17 }1819 let {20 children,21 class: className,22 reverse = false,23 duration = 20,24 radius = 160,25 path = false,26 iconSize = 30,27 speed = 1,28 angle = 0,29 delay = 0,30 ...props31 }: OrbitingCirclesProps = $props();3233 let calculatedDuration = $derived(duration / speed);34</script>3536{#if path}37 <svg38 xmlns="http://www.w3.org/2000/svg"39 version="1.1"40 class="pointer-events-none absolute inset-0 size-full"41 >42 <circle43 class="stroke-1 dark:stroke-white/20"44 cx="50%"45 cy="50%"46 r={radius}47 fill="none"48 stroke-dasharray="4 4"49 />50 </svg>51{/if}5253<div54 style:--duration={calculatedDuration}55 style:--radius={radius}56 style:--angle={angle}57 style:--delay={delay}58 style:--icon-size="{iconSize}px"59 class={cn(60 "animate-orbit absolute flex size-(--icon-size) transform-gpu items-center justify-center rounded-full [animation-delay:calc(var(--delay)*1000ms)]",61 { "direction-[reverse]": reverse },62 className63 )}64 {...props}65>66 {@render children()}67</div>
Files it writes
More from Svelte Animations
All 66 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Beamanimated-beam | Svelte Animations | Blocks | Free | 1 dep · 6 files | |
| Animated Circular Progress Baranimated-circular-progress-bar | Svelte Animations | Blocks | Free | no deps · 2 files | |
| Animated Gradient Textanimated-gradient-text | Svelte Animations | Blocks | Free | no deps · 2 files | |
| Animated Grid Patternanimated-grid-pattern | Svelte Animations | Blocks | Free | 1 dep · 2 files | |
| Animated Listanimated-list | Svelte Animations | Blocks | Free | 1 dep · 2 files | |
| Animated Shiny Textanimated-shiny-text | Svelte Animations | Blocks | Free | no deps | |
| Animated Theme Toggleranimated-theme-toggler | Svelte Animations | Blocks | Free | no deps · 2 files | |
| Arc Timelinearc-timeline | Svelte Animations | Blocks | Free | no deps · 3 files |
