- Location:
sabo/src/components/ui/border-beam.tsx
Border Beam: a focused highlight sweeping along the border (spotlight). Different from
Shine Border which is a uniform shimmer; use Beam when you want a more noticeable, directional accent.When to use
- Add a directional accent to a card/container border.
- Use for hero cards or highlighted sections where motion can help focus.
Usage
sabo/src/components/ui/border-beam.tsx
Key props
number
default:"50"
Beam size (px). Larger values create a wider highlight.
number
default:"6"
Time in seconds for one full sweep.
string
default:"#ffaa40"
Start color for the gradient beam.
string
default:"#9c40ff"
End color for the gradient beam.
number
default:"1"
Overlay border thickness (px).
boolean
default:"false"
Sweep direction.
Styling tip
- Parent must be
relativewith a rounded radius; the beam mirrors the parent’s shape. - Keep
borderWidthsmall and colors subtle to avoid overpowering content.