Light field
Playground
Preset
Palette
Leans to pointer
Install
npm install @shavin/fximport { LightField } from "@shavin/fx";Works with
React
Client component; Next.js and any React 18+ app
Remotion
Frame-exact through FxTimeProvider or time
Blades behind a hero
The default preset="blades" filling a section, with the heading drawn above it.
Attribution you can audit
Every conversion traced to the touchpoint that earned it.
Component Source
import { LightField } from "@shavin/fx/light-field";
<section className="relative">
<LightField preset="blades" className="absolute inset-0" />
…
</section>Eclipse
Component Source
<LightField preset="eclipse" />Horizon
Component Source
<LightField preset="horizon" />Beams
Component Source
<LightField preset="beams" />Prism
Component Source
<LightField preset="prism" />Streak
Component Source
<LightField preset="streak" />Ring
Component Source
<LightField preset="ring" />Ripples
Component Source
<LightField preset="ripples" />Blades, theme palette
colors="theme" swaps the reference colours for a ramp of the brand that follows light and dark.
Component Source
<LightField preset="blades" colors="theme" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| preset | "blades" | "eclipse" | "horizon" | "beams" | "prism" | "streak" | "ring" | "ripples" | "blades" | Light composition: diagonal fins, a dark disc with a lit rim, a horizon line with a halo, a fan of rising rays, a spectral fan, horizontal streaks, a ring of turning segments, or concentric arcs from the lower left. Each has its own look component (LightBlades, Eclipse, HorizonGlow, LightBeams, Prism, LightStreaks, SegmentedRing, Ripples). |
| colors | "native" | "theme" | "brand-dark" | "brand-light" | string[] | { light: string[]; dark: string[] } | "native" | Palette: "native" each preset'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. |