Skip to content

Spirograph

Playground

Colours

Pointer

Install

npm install @shavin/fx
import { Spirograph } from "@shavin/fx";

Works with

React

Client component; Next.js and any React 18+ app

Remotion

Frame-exact through FxTimeProvider or time

Usage

Component Source
import { Spirograph } from "@shavin/fx";

<Spirograph colors={["oklch(0.55 0.12 200)", "oklch(0.85 0.14 165)"]} />

Props

PropTypeDefaultDescription
colors"native" | "theme" | "brand-dark" | "brand-light" | string[] | { light: string[]; dark: string[] }"native"Line colours, first line to last: "native" the foreground colour throughout; "theme" a ramp of the brand that follows light/dark; "brand-dark" / "brand-light" that ramp forced to one side; or your own theme tokens (fg, brand) or CSS colours (an array, or { light, dark } arrays).
densitynumber1How many lines make the figure, 0.4 to 2.
lineWidthnumber0.8Stroke width in CSS px.
opacitynumber0.55Line opacity, 0 to 1; overlaps add up to brighter light on dark pages.
speednumber1Animation speed multiplier; 0 holds still.
interactivebooleantrueThe figure turns toward the pointer (mouse, touch and pen).
timenumber—Controlled time in seconds (e.g. frame / fps in Remotion); also read from FxTimeProvider.
Configure Theme
Theme
Brand Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font