Background Glow

A soft light behind the content of its child, following the pointer.

Usage

Move the mouse over the card.

tsx
<BackgroundGlow tolerance={0.6}>
  <Card>…</Card>
</BackgroundGlow>

hover me

Strength

tsx
<BackgroundGlow tolerance={0.6} opacity={0.45} noise={0}>
  <Card>…</Card>
</BackgroundGlow>

stronger, no grain

Reference

proptypedefault
childrenReactElement—a single element
tolerance?number1the glow's radius, as a fraction of the child's longest side
opacity?number0.2the glow's strongest opacity
noise?number0.04opacity of the grain over the glow; 0 removes it