Skip to content
Alea0.1
Pro
  1. Alea
  2. Components
  3. Effects
  4. BorderBeam and Spotlight

EffectsAlea Pro

BorderBeam and Spotlight

A light that runs along the border of a featured card, and a soft light that follows the pointer over a surface.

import { BorderBeam, Spotlight } from '@alea/pro';

Examples

Border beam and spotlight

A light runs along a featured card; a soft light follows the pointer.

Featured

Pro yearly

The beam marks the plan most people pick.

Spotlight

Move the pointer over this card.

Tokens

The design tokens this component reads, with their value in the current theme. Override any of them to restyle it.

Color

  • --alea-accent…
  • --alea-accent-second…

Component

  • --alea-beam-angle…
  • --alea-beam-duration…
  • --alea-beam-from…
  • --alea-beam-size…
  • --alea-beam-to…
  • --alea-beam-width…

Props

BorderBeam props

A light that runs along the border of its parent (which needs position: relative and a radius). Marks a featured or active card.

PropTypeDefaultDescription
colors[string, string]-Beam colors (start, end). Default the accent gradient.
durationnumber6Seconds per lap. Default 6.
sizenumber60Length of the beam in degrees of the lap. Default 60.
widthnumber1.5Border width in px. Default 1.5.

Spotlight props

A surface with a soft light that follows the pointer, and a border that glows near it.

PropTypeDefaultDescription
asElementType'div'
classNamestring-
styleCSSProperties-

Specs

Generated from the source: the variants in the types, the states and tokens in the CSS, and the motion patterns that apply. The grids render the real component in both themes; the numbers are measured from the page.

BorderBeam

Dark and light
Every color comes from theme tokens, so it follows data-theme (and presets like Graphite) on the page or any wrapper. Contrast is checked in both themes.
Styling hooks
.alea-border-beam

Spotlight

States
Hover (CSS)Focus inside
Dark and light
Every color comes from theme tokens, so it follows data-theme (and presets like Graphite) on the page or any wrapper. Contrast is checked in both themes.
Styling hooks
.alea-spotlight

Accessibility

  • Both are decoration, hidden from screen readers.
  • The beam stops with reduced motion; the spotlight only reacts to the pointer and never moves on its own.

Do and don't

Do

  • Mark one thing: the featured plan, the active card.

Don't

  • Don't put beams on every card; it stops meaning anything.
Tested with axe, keyboard and screen reader roles