Classic loader
Pulsing spokes
A radial wave of spokes stretches into view and fades away. A single React component with its CSS built in and no dependencies. Install it with the shadcn CLI or copy the source.
Preview and installation
Run this command in any project set up with shadcn.
npx shadcn@latest add https://loadercn.vercel.app/r/classic-pulsing-spokes.jsonAdded the @loadercn registry? Use the short form:
npx shadcn@latest add @loadercn/classic-pulsing-spokesThen add it to your interface:
import { ClassicPulsingSpokes } from "@/components/ui/classic-pulsing-spokes"
<ClassicPulsingSpokes size={48} speed={1.6} />Inherits text color. Accepts className, style, and a custom loading label. Respects reduced-motion preferences.
import type { CSSProperties, ComponentProps } from "react"
export type ClassicPulsingSpokesProps = ComponentProps<"span"> & {
size?: number
/** Duration of one complete cycle, in seconds. */
speed?: number
label?: string
}
export function ClassicPulsingSpokes({
size = 40,
speed = 1.6,
label = "Loading",
className,
style,
...props
}: ClassicPulsingSpokesProps) {
return (
<span
role="status"
aria-label={label}
{...props}
className={["classic-pulsing-spokes-loader", className]
.filter(Boolean)
.join(" ")}
style={
{
width: size,
height: size,
"--loader-size": `${size}px`,
"--loader-duration": `${Math.max(0.1, speed)}s`,
...style,
} as CSSProperties
}
>
<span aria-hidden="true" className="classic-pulsing-spokes-loader-body">
{Array.from({ length: 12 }, (_, i) => (
<span
key={i}
className="classic-pulsing-spokes-loader-arm"
style={{ transform: `rotate(${i * 30}deg)` }}
>
<span
style={{
animationDelay: `${(i / 12 - 1) * Math.max(0.1, speed)}s`,
}}
/>
</span>
))}
</span>
<style>{`
.classic-pulsing-spokes-loader { display: inline-flex; flex-shrink: 0; }
.classic-pulsing-spokes-loader-body { position: relative; width: 100%; height: 100%; }
.classic-pulsing-spokes-loader-arm { position: absolute; inset: 8%; }
.classic-pulsing-spokes-loader-arm > span { position: absolute; top: 0; left: 45%; width: 10%; height: 24%; border-radius: 999px; background: currentColor; transform-origin: center bottom; animation: classic-pulsing-spokes-loader-pulse var(--loader-duration) ease-in-out infinite; }
@keyframes classic-pulsing-spokes-loader-pulse { 0%, 80%, 100% { transform: scaleY(.65); opacity: .08; } 20% { transform: scaleY(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .classic-pulsing-spokes-loader-arm > span { animation: none; opacity: .65; } }
`}</style>
</span>
)
}
Copy the complete file into your components directory. Styles are included.
When to use it
A more expressive take on the system spinner. Use it when a classic spokes loader needs a little more energy.
Props
Pulsing spokes accepts size, speed, label, className, and style, like every loader in the collection. See the installation guide for the full reference.