Border beam
Playground
Usage-based billing
Pay for the seats and runs you use, invoiced monthly.
Colour
Install
npm install @shavin/fximport { BorderBeam } from "@shavin/fx";Works with
React
Client component; Next.js and any React 18+ app
Remotion
Frame-exact through FxTimeProvider or time
On a card
Place it as the last child of a positioned, rounded container. It reads the container's size and corner radii and redraws when the size changes.
Usage-based billing
Pay for the seats and runs you use, invoiced monthly.
Component Source
import { BorderBeam } from "@shavin/fx";
<div className="relative rounded-[var(--radius-panel)] border border-hairline bg-surface p-6">
…
<BorderBeam />
</div>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| duration | number | 6 | Seconds per lap of the border. |
| length | number | 0.18 | Comet length as a fraction of the border. |
| width | number | 1.5 | Core stroke width in px. |
| glow | number | 4 | Glow blur radius in px (0 turns it off). |
| track | number | 0 | Opacity of the faint full border (0 hides it). |
| count | number | 1 | Comets spaced evenly around the border. |
| color | FxColor | "brand" | Colour: a theme token (fg, brand, muted), any CSS colour or var(--token), or a { light, dark } pair. |
| tone | FxColor | — | Deprecated: use color. |
| time | number | — | Controlled time in seconds (e.g. frame / fps in Remotion): draws exactly this moment, no clock of its own. Also read from FxTimeProvider. |