Border Beam

A stylish animated border beam effect with customizable size, duration, colors, and delay.

API

Prop NameTypeDefaultDescription
classstring""Additional CSS classes for custom styling.
sizenumber200Size of the animated border beam effect.
durationnumber15Duration of the animation in seconds.
borderWidthnumber1.5Width of the border around the beam effect.
anchornumber90Anchor point for the beam, determining its position along the border.
colorFromstring"#ffaa40"Starting color for the gradient of the beam.
colorTostring"#9c40ff"Ending color for the gradient of the beam.
delaynumber0Delay before the animation starts, in seconds.

Component Code

You can copy and paste the following code to create this component:

BorderBeam.vue

Features

  • Animated Border Beam: Adds a dynamic border beam effect that animates around the border.
  • Customizable Gradient Colors: Adjust the colorFrom and colorTo props to create a gradient effect that suits your design.
  • Flexible Animation Settings: Control the size, duration, and delay of the animation to fine-tune the visual experience.
  • Anchor Positioning: Use the anchor prop to set the starting position of the beam along the border.

Credits