"use client"; import { motion, useReducedMotion } from "motion/react"; type PulseCoreProps = { className?: string; color?: string; /** Loader width in pixels. */ size?: number; /** 1 is the default pace; 2 is twice as fast. */ speed?: number; /** Read out by screen readers. */ label?: string; }; /* PulseCore: a bright core beats while rings ripple out from it and fade. */ export function PulseCore({ className = "", color = "#a78bfa", size = 72, speed = 1, label = "Loading", }: PulseCoreProps) { const reduce = useReducedMotion(); const beat = 1.8 / speed; return (
{label} {!reduce && [0, 1, 2].map((i) => ( ))}
); }