Border Beam

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

Install using CLI

npm
pnpm
bun
yarn
npx shadcn-vue@latest add "https://inspira-ui.com/r/border-beam.json"

Install Manually

Copy and paste the following code

BorderBeam.vue

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.

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