MCPcopy Create free account
hub / github.com/SyntaxUI/syntaxui / WhirlpoolLoader

Function WhirlpoolLoader

src/showcase/components/loaders/WhirlpoolLoader.tsx:6–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import { motion } from 'framer-motion'
5
6const WhirlpoolLoader = () => {
7 const segments = 50
8 const rotations = 5
9
10 return (
11 <div className="flex h-60 w-60 items-center justify-center">
12 <svg width="100%" height="100%" viewBox="-100 -100 200 200">
13 <motion.g
14 animate={{ rotate: 360 }}
15 transition={{ duration: 20, repeat: Infinity, ease: 'linear' }}
16 >
17 {[...Array(segments)].map((_, i) => {
18 const angle = (i / segments) * Math.PI * 2 * rotations
19 const radius = 5 + (90 * i) / segments
20 const x = Math.cos(angle) * radius
21 const y = Math.sin(angle) * radius
22
23 return (
24 <motion.circle
25 key={i}
26 cx={x}
27 cy={y}
28 r={2 + (i / segments) * 3}
29 fill="#fb3a5d"
30 initial={{ scale: 0, opacity: 0 }}
31 animate={{ scale: 1, opacity: 1 }}
32 transition={{
33 duration: 0.5,
34 delay: (i / segments) * 2,
35 repeat: Infinity,
36 repeatType: 'reverse',
37 repeatDelay: 1,
38 }}
39 />
40 )
41 })}
42 </motion.g>
43 </svg>
44 </div>
45 )
46}
47
48export default WhirlpoolLoader

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected