Presets

React loading animation components

12 loaders with ready-to-paste React code.

01 Spinner loop
Spinner · React Tune →
import { motion } from "motion/react";

export function Spinner() {
  return (
    <motion.div
      role="status"
      aria-label="Loading"
      style={{ boxSizing: "border-box", width: "48px", height: "48px", border: "4px solid #d4ff3a2e", borderTopColor: "#d4ff3a", borderRadius: "50%" }}
      initial={{ transform: "rotate(0deg)" }}
      animate={{ transform: ["rotate(0deg)", "rotate(360deg)"] }}
      transition={{ duration: 0.9, ease: "linear", repeat: Infinity }}
    />
  );
}
02 Dual ring loop
Dual ring · React Tune →
import { motion } from "motion/react";

export function DualRing() {
  return (
    <div
      role="status"
      aria-label="Loading"
      style={{ position: "relative", width: "56px", height: "56px" }}
    >
      <motion.span
        style={{ position: "absolute", inset: "0", border: "4px solid transparent", borderTopColor: "#d4ff3a", borderBottomColor: "#d4ff3a", borderRadius: "50%" }}
        initial={{ transform: "rotate(0deg)" }}
        animate={{ transform: ["rotate(0deg)", "rotate(360deg)"] }}
        transition={{ duration: 1.2, ease: [0.42, 0, 0.58, 1], repeat: Infinity }}
      />
      <motion.span
        style={{ position: "absolute", inset: "12.32px", border: "4px solid transparent", borderLeftColor: "#7c7cff", borderRightColor: "#7c7cff", borderRadius: "50%" }}
        initial={{ transform: "rotate(360deg)" }}
        animate={{ transform: ["rotate(360deg)", "rotate(0deg)"] }}
        transition={{ duration: 0.9, ease: [0.42, 0, 0.58, 1], repeat: Infinity }}
      />
    </div>
  );
}
03 Bouncing dots loop
Bouncing dots · React Tune →
import { motion } from "motion/react";

export function Dots() {
  return (
    <div
      role="status"
      aria-label="Loading"
      style={{ display: "flex", alignItems: "center", gap: "8.4px" }}
    >
      {Array.from({ length: 3 }, (_, i) => (
        <motion.span
          key={i}
          style={{ width: "14px", height: "14px", borderRadius: "50%", background: "#d4ff3a" }}
          initial={{ transform: "scale(0.35)", opacity: "0.35" }}
          animate={{ transform: ["scale(0.35)", "scale(1)", "scale(0.35)", "scale(0.35)"], opacity: ["0.35", "1", "0.35", "0.35"] }}
          transition={{ duration: 1.4, ease: [0.42, 0, 0.58, 1], times: [0, 0.4, 0.8, 1], repeat: Infinity, delay: i * 0.16 }}
        />
      ))}
    </div>
  );
}
04 Typing indicator loop
Typing indicator · React Tune →
import { motion } from "motion/react";

export function TypingDots() {
  return (
    <div
      role="status"
      aria-label="Typing"
      style={{ display: "inline-flex", alignItems: "center", gap: "4.8px", padding: "12.8px 16px", background: "#2a2a30", borderRadius: "20px", borderBottomLeftRadius: "4.8px" }}
    >
      {Array.from({ length: 3 }, (_, i) => (
        <motion.span
          key={i}
          style={{ width: "8px", height: "8px", borderRadius: "50%", background: "#e8e8ea" }}
          initial={{ transform: "translateY(0px)", opacity: "0.45" }}
          animate={{ transform: ["translateY(0px)", "translateY(-6px)", "translateY(0px)", "translateY(0px)"], opacity: ["0.45", "1", "0.45", "0.45"] }}
          transition={{ duration: 1.2, ease: [0.42, 0, 0.58, 1], times: [0, 0.3, 0.6, 1], repeat: Infinity, delay: i * 0.15 }}
        />
      ))}
    </div>
  );
}
05 Equalizer bars loop
Equalizer bars · React Tune →
import { motion } from "motion/react";

export function Bars() {
  return (
    <div
      role="status"
      aria-label="Loading"
      style={{ display: "flex", alignItems: "center", gap: "4.2px", height: "40px" }}
    >
      {Array.from({ length: 5 }, (_, i) => (
        <motion.span
          key={i}
          style={{ width: "6px", height: "100%", borderRadius: "3px", background: "#d4ff3a" }}
          initial={{ transform: "scaleY(0.35)" }}
          animate={{ transform: ["scaleY(0.35)", "scaleY(1)", "scaleY(0.35)", "scaleY(0.35)"] }}
          transition={{ duration: 1, ease: [0.42, 0, 0.58, 1], times: [0, 0.2, 0.4, 1], repeat: Infinity, delay: i * 0.1 }}
        />
      ))}
    </div>
  );
}
06 Progress bar loop
Progress bar · React Tune →
import { motion } from "motion/react";

export function ProgressBar() {
  return (
    <div
      role="progressbar"
      aria-label="Loading"
      style={{ position: "relative", width: "280px", height: "6px", overflow: "hidden", borderRadius: "6px", background: "#d4ff3a26" }}
    >
      <motion.span
        style={{ position: "absolute", top: "0", bottom: "0", left: "0", width: "40%", borderRadius: "6px", background: "#d4ff3a" }}
        initial={{ transform: "translateX(-100%)" }}
        animate={{ transform: ["translateX(-100%)", "translateX(250%)"] }}
        transition={{ duration: 1.6, ease: [0.65, 0, 0.35, 1], repeat: Infinity }}
      />
    </div>
  );
}
07 Skeleton loader loop
Skeleton loader · React Tune →
import { motion } from "motion/react";

export function Skeleton() {
  return (
    <div
      role="status"
      aria-label="Loading content"
      style={{ display: "flex", gap: "14px", alignItems: "flex-start", width: "300px" }}
    >
      <motion.span
        style={{ flex: "none", width: "44px", height: "44px", borderRadius: "50%", background: "linear-gradient(90deg, #232328 30%, #3a3a42 50%, #232328 70%)", backgroundSize: "300% 100%" }}
        initial={{ backgroundPosition: "100% 0" }}
        animate={{ backgroundPosition: ["100% 0", "0% 0"] }}
        transition={{ duration: 1.6, ease: [0.42, 0, 0.58, 1], repeat: Infinity }}
      />
      <span style={{ display: "flex", flexDirection: "column", gap: "10px", flex: "1" }}>
        {Array.from({ length: 3 }, (_, i) => (
          <motion.span
            key={i}
            style={{ width: `${100 - i * 22}%`, height: "12px", borderRadius: "6px", background: "linear-gradient(90deg, #232328 30%, #3a3a42 50%, #232328 70%)", backgroundSize: "300% 100%" }}
            initial={{ backgroundPosition: "100% 0" }}
            animate={{ backgroundPosition: ["100% 0", "0% 0"] }}
            transition={{ duration: 1.6, ease: [0.42, 0, 0.58, 1], repeat: Infinity }}
          />
        ))}
      </span>
    </div>
  );
}
08 Pulse ring loop
Pulse ring · React Tune →
import { motion } from "motion/react";

export function PulseRing() {
  return (
    <div
      role="status"
      aria-label="Loading"
      style={{ position: "relative", width: "64px", height: "64px" }}
    >
      {Array.from({ length: 2 }, (_, i) => (
        <motion.span
          key={i}
          style={{ position: "absolute", inset: "0", border: "2px solid #d4ff3a", borderRadius: "50%" }}
          initial={{ transform: "scale(0.25)", opacity: "1" }}
          animate={{ transform: ["scale(0.25)", "scale(1)"], opacity: ["1", "0"] }}
          transition={{ duration: 1.8, ease: [0.16, 1, 0.3, 1], repeat: Infinity, delay: i * 0.9 }}
        />
      ))}
      <span
        style={{ position: "absolute", inset: "24.32px", borderRadius: "50%", background: "#d4ff3a" }}
      />
    </div>
  );
}
09 Ripple loop
Ripple · React Tune →
import { motion } from "motion/react";

export function Ripple() {
  return (
    <div
      role="status"
      aria-label="Loading"
      style={{ position: "relative", width: "72px", height: "72px" }}
    >
      {Array.from({ length: 3 }, (_, i) => (
        <motion.span
          key={i}
          style={{ position: "absolute", border: "3px solid #d4ff3a", borderRadius: "50%" }}
          initial={{ inset: "45%", opacity: "0" }}
          animate={{ inset: ["45%", "40%", "0%"], opacity: ["0", "1", "0"] }}
          transition={{ duration: 1.5, ease: [0.25, 1, 0.5, 1], times: [0, 0.1, 1], repeat: Infinity, delay: i * 0.5 }}
        />
      ))}
    </div>
  );
}
10 Orbit loop
Orbit · React Tune →
import { motion } from "motion/react";

export function Orbit() {
  return (
    <div
      role="status"
      aria-label="Loading"
      style={{ position: "relative", width: "72px", height: "72px" }}
    >
      <span
        style={{ position: "absolute", inset: "0", border: "1px solid #d4ff3a33", borderRadius: "50%" }}
      />
      <motion.span
        style={{ position: "absolute", inset: "0" }}
        initial={{ transform: "rotate(0deg)" }}
        animate={{ transform: ["rotate(0deg)", "rotate(360deg)"] }}
        transition={{ duration: 1.6, ease: "linear", repeat: Infinity }}
      >
        <span
          style={{ position: "absolute", top: "-5.04px", left: "30.96px", width: "10.08px", height: "10.08px", borderRadius: "50%", background: "#d4ff3a", boxShadow: "0 0 8.64px #d4ff3a" }}
        />
      </motion.span>
      <motion.span
        style={{ position: "absolute", inset: "18px" }}
        initial={{ transform: "rotate(360deg)" }}
        animate={{ transform: ["rotate(360deg)", "rotate(0deg)"] }}
        transition={{ duration: 0.96, ease: "linear", repeat: Infinity }}
      >
        <span
          style={{ position: "absolute", top: "-3.24px", left: "14.76px", width: "6.48px", height: "6.48px", borderRadius: "50%", background: "#7c7cff" }}
        />
      </motion.span>
    </div>
  );
}
11 Flipping square loop
Flipping square · React Tune →
import { motion } from "motion/react";

export function SquareFlip() {
  return (
    <motion.div
      role="status"
      aria-label="Loading"
      style={{ width: "40px", height: "40px", borderRadius: "6px", background: "#d4ff3a" }}
      initial={{ transform: "perspective(120px) rotateX(0deg) rotateY(0deg)" }}
      animate={{ transform: ["perspective(120px) rotateX(0deg) rotateY(0deg)", "perspective(120px) rotateX(-180deg) rotateY(0deg)", "perspective(120px) rotateX(-180deg) rotateY(-180deg)"] }}
      transition={{ duration: 1.4, ease: [0.65, 0, 0.35, 1], times: [0, 0.5, 1], repeat: Infinity }}
    />
  );
}
12 Arc spinner loop
Arc spinner · React Tune →
import { motion } from "motion/react";

export function ArcSpinner() {
  return (
    <motion.svg
      viewBox="0 0 50 50"
      role="status"
      aria-label="Loading"
      style={{ width: "48px", height: "48px" }}
      initial={{ transform: "rotate(0deg)" }}
      animate={{ transform: ["rotate(0deg)", "rotate(360deg)"] }}
      transition={{ duration: 2.1, ease: "linear", repeat: Infinity }}
    >
      <motion.circle
        cx="25"
        cy="25"
        r="20"
        style={{ fill: "none", stroke: "#d4ff3a", strokeWidth: "4", strokeLinecap: "round" }}
        initial={{ strokeDasharray: "1 150", strokeDashoffset: "0" }}
        animate={{ strokeDasharray: ["1 150", "90 150", "90 150"], strokeDashoffset: ["0", "-35", "-124"] }}
        transition={{ duration: 1.5, ease: [0.42, 0, 0.58, 1], times: [0, 0.5, 1], repeat: Infinity }}
      />
    </motion.svg>
  );
}

These loading animations come out as ready-to-paste React components. Each one is a single function that renders the loader's elements and animates them with Motion (import from "motion/react"), so there is no CSS file or keyframe stylesheet to wire up: the keyframes become value arrays with times, and easing curves become exact cubic-bezier arrays that match the CSS version.

Repeated parts such as the dots in Bouncing dots or the Equalizer bars are rendered with a map, with each element's delay written as index times stagger, so changing the count is a one-line edit. Size, color and duration appear as plain values in the component, which makes it easy to turn them into props like size or color.

The components keep role="status" and aria-label on the root, so they announce themselves. Render a React loader component conditionally while data is pending, or use it as a Suspense fallback.

Which package do I need for these React loaders?

Motion, installed with npm install motion. The components import from motion/react, the current entry point of the library formerly known as Framer Motion. No other dependency is needed, and no global CSS is required, because all styles and animations are defined inside the component.

How do I use a loader as a Suspense fallback?

Pass the component to the fallback prop: <Suspense fallback={<Spinner />}> around the part of the tree that loads data or code lazily. React shows the loader while the child suspends. For skeletons, render the Skeleton loader component with the same width as the content it replaces to avoid a layout jump.

How do I make the loader respect reduced motion in React?

Use Motion's useReducedMotion hook inside the component and, when it returns true, render a static version or set the transition duration to a slower value. You can also wrap your app in MotionConfig with reducedMotion="user", which disables transform animations for users who request reduced motion.