Effects Fancy Stable

BorderBeam

Gradient beam that races around a container's border using a CSS offset-path animation, masked so only the border ring is painted, with configurable size, speed, anchor position, and gradient colors

Preview

Installation

pnpm add fancy-ui-svelte
import { BorderBeam } from 'fancy-ui-svelte'

Usage

svelte
<script lang="ts">
  import { BorderBeam } from 'fancy-ui-svelte';
</script>

<BorderBeam />

Examples

Basic Usage

Custom Colors

Change beam gradient colors.

Animation Speed

Control beam speed.

Size & Width

Adjust beam dimensions.

Multiple Beams

Stack multiple beams.

Interactive Playground

Props

PropTypeDefaultDescription
size number200Size of the beam in pixels
duration number15Animation duration in seconds
borderWidth number1.5Border width in pixels
anchor number90Anchor position (0-100)
colorFrom string"#ffaa40"Gradient start color
colorTo string"#9c40ff"Gradient end color
delay number0Animation delay in seconds