Dot Orbit

Installation

npm i @paper-design/shaders-react

Code

import { DotOrbit } from '@paper-design/shaders-react';

<DotOrbit
  style={{ height: 500 }}
  colorBack="#000000"
  stepsPerColor={4}
  size={1}
  sizeRange={0}
  spreading={1}
  scale={1}
  speed={1.5}
  colors={["#cc3333","#cc9933","#99cc33","#33cc33","#33cc99"]}
/>

Props

NameDescriptionTypeValues
colorBackBackground colorstringHex, RGB, or HSL color
colorsUp to 10 base colorsstring[]Hex, RGB, or HSL color
stepsPerColorNumber of extra colors between base colors (1 = N color palette, 2 = 2×N color palette, 3 = 3×N color palette, etc)number1 to 4 (integer)
sizeDot radius relative to cell sizenumber0 to 1
sizeRangeRandom variation in shape size (0 = uniform size, higher = random value up to base size)number0 to 1
spreadingMaximum orbit distancenumber0 to 1
scaleOverall zoom level of the graphicsnumber0.01 to 5
speedAnimation speednumber0 to 20

Description

Animated multi-color dots pattern with each dot orbiting around its cell center. Supports up to 40 colors and various shape and motion controls. Great for playful, dynamic backgrounds and UI textures