Getting started

Getting started

Install the package, then draw the dots on a canvas, or drop in the React component.

Install

npm install @reuse-sh/loaders

Use it

The browser module works without a framework. In React, the component creates the same controller when it mounts and destroys it when it unmounts.

import {
  createThinkingDots,
  figureConfig,
} from "@reuse-sh/loaders";

const loader = createThinkingDots(canvas, {
  size: 32,
  config: figureConfig("triangle-turn"),
});

// Later, when the answer arrives
loader.destroy();