Skip to content

Segmented ring

Playground

Palette

Leans to pointer

Install

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

Works with

React

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

Remotion

Frame-exact through FxTimeProvider or time

Usage

SegmentedRing is LightField with preset="ring" and takes every other LightField prop. It fills its parent, so give the parent a size and draw your content above it.

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

<SegmentedRing className="absolute inset-0" />

Props

PropTypeDefaultDescription
colors"native" | "theme" | "brand-dark" | "brand-light" | string[] | { light: string[]; dark: string[] }"native"Palette: "native" the look's own reference colours; "theme" a ramp of the brand that follows light/dark; "brand-dark" / "brand-light" that ramp forced to one side; or your own 4 colours, dark to bright (an array, or { light, dark } arrays).
speednumber1Animation speed multiplier.
intensitynumber1Brightness multiplier.
grainnumber0.05Film grain over the light, 0 to 0.3.
interactivebooleantrueThe light leans toward the pointer (mouse, touch and pen) and eases back when it leaves. No effect when time is set.
timenumber—Controlled time in seconds (e.g. frame / fps in Remotion): draws exactly this moment and runs no clock of its own. Also read from FxTimeProvider.
Configure Theme
Theme
Brand Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font