Skip to content

Line art

Playground

Figure

Colours

Pointer

Install

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

Works with

React

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

Remotion

Frame-exact through FxTimeProvider or time

Teal torus

Component Source
<LineArt preset="torus" colors={["oklch(0.55 0.12 200)", "oklch(0.85 0.14 165)"]} />

Ribbon

Component Source
<LineArt preset="ribbon" colors={["oklch(0.55 0.2 290)", "oklch(0.75 0.15 230)", "oklch(0.9 0.08 200)"]} />

Spirograph

Component Source
<LineArt preset="spirograph" opacity={0.4} />

Props

PropTypeDefaultDescription
preset"torus" | "ribbon" | "spirograph""torus"Which figure.
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.
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