Border Beam
An animated light beam that travels around the border of any container.
Border Beam
BorderBeam adds a sleek, animated border effect to your components. It uses hardware-accelerated CSS animations for a smooth experience.
How To Use
Import
Import the component into your project.
import { BorderBeam } from '@/components/ui/hatch/border-beam';Preview
Beam
Props
| Prop | Type | Default |
|---|---|---|
delay? | number | 0 |
colorTo? | string | #9c40ff |
colorFrom? | string | #ffaa40 |
borderWidth? | number | 1.5 |
duration? | number | 15 |
size? | number | 200 |
✨ Features
- Smooth CSS animations
- Highly customizable gradients
- Works on any container with
relativepositioning andoverflow-hidden - Lightweight and dependency-free
🧠 When to Use
- Use to draw attention to specific sections
- Use for "Pro" or "Premium" feature cards
- Use for loading states or interactive buttons