Segmented ring
Playground
Palette
Leans to pointer
Install
npm install @shavin/fximport { 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
| Prop | Type | Default | Description |
|---|---|---|---|
| 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). |
| speed | number | 1 | Animation speed multiplier. |
| intensity | number | 1 | Brightness multiplier. |
| grain | number | 0.05 | Film grain over the light, 0 to 0.3. |
| interactive | boolean | true | The light leans toward the pointer (mouse, touch and pen) and eases back when it leaves. No effect when time is set. |
| time | number | — | 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. |