Effects Fancy Stable

NeonBorder

.md

Two-colour neon tube around its content: two beams with white-hot cores chase each other along a faint tube, their glow spilling inside and outside the edge, humming slowly after a flicker on ignition

Preview

Installation

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

Usage

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

<NeonBorder />

Examples

Basic Usage

Animation Types

Different animation styles.

Custom Colors

Speed Variations

Interactive Playground

Props

PropTypeDefaultDescription
color1 string"#0496ff"First neon color
color2 string"#ff0a54"Second neon color
animationType "none" | "half" | "full""half"How much of the tube is lit: none (two lit corners, static), half (two short beams chasing), full (two long beams that nearly close the ring)
duration number6Time for the beams to travel once around, in seconds

Slots

SlotDescription
childrenContent to display inside the neon border container