Spotlight

Renders a soft radial light that follows the cursor inside the target. The element must be positioned (relative/absolute/fixed); clipping is up to you.

Move the cursor across this surface.

Usage

import { Spotlight } from '@bwo-ui/react';

<Spotlight size={320} color="rgba(255,72,31,0.18)">
  <div className="card">...</div>
</Spotlight>

Props

PropTypeDefaultDescription
sizenumber320Spotlight radius in px.
colorstring'rgba(255,255,255,0.12)'Any CSS colour the radial-gradient accepts.
durationnumber0.4Tween duration.
easestring'power3.out'GSAP ease.
hideOnLeavebooleantrueWhen false, the spotlight stays visible after pointerleave.