Border Beam
Animated glow that wraps any element. A beam travels around the border (rotate family) or the glow breathes in place (pulse family). Vue port of border-beam by Jakub Antalik, MIT licensed.
Default
Wrap any element. The beam sizes itself to the wrapper and picks up the border radius of the first child, so a rounded card needs no extra configuration.
Build anything...
Rotate family
A beam travels around the element. md is the full border glow, sm is tuned for compact controls, and line lights only the bottom edge, which suits inputs and search bars.
Pulse family
The glow breathes instead of travelling. pulse-inner stays contained inside the border, pulse-outside blooms past the element as a halo, so give it room to spill and an opaque child to bloom behind.
Working...
- Generate color palettes
- Recommend font pairings
- Create layout templates
- Build section engine
Color variants
Four palettes. All of them drift through a hue cycle except mono, which pins its colors.
Strength
strength scales the whole effect between 0 and 1. It touches only the beam, glow and bloom layers, never the wrapped content.
Theme
The palette adapts to the substrate it sits on. auto follows the nearest data-theme attribute or dark/light class and updates live when the page theme flips. Pin it with light or dark when the element sits on a fixed surface.
Play and pause
Toggling active fades the effect in and out rather than cutting it. The activate and deactivate events fire once each fade finishes.
Playground
Every knob on one panel. Type and color use Toggle Group, strength uses Slider Ruler, and the button drives the fade.
API Reference
BorderBeam
Accessibility
Keyboard shortcuts and ARIA behavior.
- Every effect layer is decorative and set to pointer-events: none, so the beam never blocks clicks, focus or screen readers.
- The pulse types ship a prefers-reduced-motion: reduce block that stops their breathing, and the shared driver skips registering an instance when that preference is set.
- Each instance pauses its painting when scrolled offscreen (IntersectionObserver with a 256px margin) and resumes on the way back in, without firing activate or deactivate.
- The pulse breathing runs on one shared requestAnimationFrame loop capped near 30fps rather than a per-instance loop, so many beams on a page stay cheap.