Skip to main content

React animation example

React Loader Animation: Orbit Spinner Component

Most React spinners are a rotating border. This loader puts three dots on a shared orbit, each lagging the one before it, so the motion reads as momentum instead of a mechanical spin. A progress input drives the percentage in the middle, so the same component works as an indeterminate spinner or a determinate loader.

  • 4.3 KB file
  • 6 live inputs
  • React runtime
Live, try it

How this orbit loader works

  • Each dot follows the same angle with a phase delay, and its trail is the last 18 positions drawn with falling opacity.
  • Set progress from 0 to 100 to show a determinate loader; leave it at -1 for an endless spinner.
  • Clicking the loader fires a "complete" event your React code can listen to with onTrigger.

Add it to your React app

Install exodeui, download the file below, and paste this. The code updates as you customize. Other runtimes are in the other tabs.

import { ExodeUICanvas } from 'exodeui';

// react-loader.bexode goes in /public (download it below)
export function ReactLoader() {
  return (
    <ExodeUICanvas
      src="/react-loader.bexode"
      fit="Layout"
      autoPlay
      interactive
      onTrigger={(name) => {
        // fires: 'complete'
      }}
      style={{ width: '100%', height: 440 }}
    />
  );
}

Inputs

InputTypeDefaultRange
progressNumber-1-1 – 100
labelTextLoading assets—
speedNumber10.2 – 3
accentText#7c5cffhex colour
accent2Text#22d3eehex colour
bgText#0b0b12hex colour

Events: complete

More React animations

The same idea in other frameworks: Flutter bouncing bars loader · SwiftUI activity rings loader · JavaScript segmented ring spinner