React Bouncing Cube – Animated Loader
Textured cube friend that squashes on every hop along its shadow track, winks on complete, and shows dizzy eyes on error. Customize colours, shadows, and Playful, Minimal, or Mono styles. Copy React & Flutter code or install via CLI.
Live vector preview rendered straight from the same 120 Hz spring engine—no heavy GIF compression artifacts, zero layout shift.
Customization playground
Tune outline, fill, accent, text colour, and shadow direction live above. The snippet updates automatically for copy-and-paste.
Customize
<BouncingCubeLoader />Installation
Install directly into your project source with the Kipluo CLI (React/Tailwind v4) or add the matching Flutter package.
Install
$ npx kipluo add bouncing-cube-loaderWorking code example
import { BouncingCubeLoader } from "@/components/kipluo/bouncing-cube-loader";
export function Example() {
return (
<div className="flex items-center justify-center p-8">
<BouncingCubeLoader value={68} status="running" size={96} />
</div>
);
}What Bouncing Cube does
- Textured cube friend that squashes on every hop along its shadow track, winks on complete, and shows dizzy eyes on error.
- Designed for Status & progress flows with real spring physics that stay smooth even when users interrupt or spam interactions.
- Ships with Playful, Minimal, and Mono themes, synthesized Web Audio feedback (optional via sound={false}), and automatic prefers-reduced-motion support.
Accessibility & sound behavior
Keyboard & screen readers: Exposed as role='progressbar' with aria-valuenow when determinate.
Reduced motion: Automatically respects prefers-reduced-motion: reduce by snapping spring targets immediately without jarring travel.
Sound cues: A bouncy jump sound on every hop, a cute baby giggle on complete, and a sad baby whimper on error. Disable per instance with sound={false} or globally via setSoundEnabled(false).
API reference
valuenumber | undefined- 0–100. Leave undefined for an endless hopping loop. Default
undefined. status"running" | "complete" | "error"- Finished or failed state. Default
"running". sizenumber- Width in px. Default
96. style"playful" | "minimal" | "mono"- Set with data-kstyle on any ancestor. Default
inherited. soundboolean- Plays this component's sounds. The global switch setSoundEnabled(false) silences every component. Default
true.
Framework compatibility
| Platform / Tool | Status | Details |
|---|---|---|
| React 18 & 19 | Full support | Zero peer runtime lock-in beyond @kipluo/core. |
| Next.js App Router | Full support | Ships with 'use client' boundaries; SSR-safe hydration. |
| Vite / Remix / Astro | Full support | Standard ESM TypeScript source files you own. |
| Tailwind CSS v4 & shadcn/ui | Native | Inherits CSS variables and installs via shadcn registry or CLI. |
| Flutter (Dart) | Native package | Matching spring physics, themes, and PCM audio in packages/flutter/kipluo. |
Build it yourself: related tutorials
All tutorials →How to Build a Custom Loading Animation with CSS
Design GPU-friendly custom CSS and SVG loaders using stroke-dashoffset, transform-only keyframes, determinate progress bars, and reduced-motion fallbacks.
How to Implement Spring Physics Without a Heavy Animation Library
Write a rock-solid 45-line semi-implicit Euler spring engine in TypeScript with fixed 120 Hz sub-stepping, zero dependencies, and true velocity preservation.
How to Handle Interrupted Animations in React
Learn why rapid clicks, mid-flight drags, and unmounts break React animations—and how velocity-preserving springs and proper cleanup make them unbreakable.
Related components
- Open component →WormFree
Determinate or indeterminate progress with complete, error and reset states.
- Open component →Pixel ProgressFree
Determinate or indeterminate progress with complete, error and reset states.
- Open component →Paper PlaneFree
A paper plane flies a loop-the-loop route as progress grows, banking along the curve. On complete it flies off the edge; on error it noses down.
- Open component →Typing IndicatorFree
A chat bubble with three dots that hop in turn. The bubble widens with progress; complete shows a check and error a cross.
- Open component →Hourglass SandFree
Specular glass hourglass with streaming sand particles rising smoothly in the lower bulb, sparkling on complete and cracking on error.
- Open component →Newton CradleFree
Five-ball Newton's cradle driven by smooth pendulum momentum transfer; determinate mode lights each sphere gold with progress and pops a line-release aura on complete.