Skip to content
Effects Fancy Stable

PulseBeam

.md

Breathing border glow that wraps any card: colour blobs drift along the edges as a crisp 1px ring, a feathered inner glow and a blurred bloom, with slow hue rotation, fade in/out on an active flag, four palettes and an outside halo variant

Available for Svelte 5, React, and Vue 3.

Preview

Installation

pnpm add fancy-ui-svelte
import { PulseBeam } from "fancy-ui-svelte";

Usage

svelte
<script lang="ts">
	import { PulseBeam } from "fancy-ui-svelte";
	import ArrowUp from "@lucide/svelte/icons/arrow-up";
	import Bot from "@lucide/svelte/icons/bot";
	import Sparkles from "@lucide/svelte/icons/sparkles";
</script>

<!-- The child owns the surface: opaque background + the same radius as the beam. -->
<PulseBeam radius={20} class="mx-auto w-full max-w-md">
	<div class="bg-card rounded-[20px] p-4">
		<p class="text-muted-foreground text-sm">Build anything…</p>
		<div class="mt-8 flex items-center gap-2">
			<span
				class="bg-muted text-muted-foreground inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs"
			>
				<Bot class="size-3.5" />
				Agent
			</span>
			<span
				class="bg-muted text-muted-foreground inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs"
			>
				<Sparkles class="size-3.5" />
				Auto
			</span>
			<span
				class="bg-foreground text-background ml-auto inline-flex size-8 items-center justify-center rounded-full"
			>
				<ArrowUp class="size-4" />
			</span>
		</div>
	</div>
</PulseBeam>

Examples

Basic Usage

Working State

Toggle `active` to fade the glow in and out around a task list.

Outside Variant

Ring plus a blurred halo behind the card.

Palettes

Colorful, mono, ocean and sunset.

Pill Button

Outside halo on a small control.

Interactive Playground

Props

PropTypeDefaultDescription
active booleantrueShow the glow. Turning it off fades out over 500ms and stops the animation loop; turning it on fades in over 600ms
variant "inner" | "outside""inner"inner paints a 1px ring, a 28px feather and a bloom inside the box; outside keeps the ring and adds a blurred halo behind the content
palette "colorful" | "mono" | "ocean" | "sunset""colorful"Built-in nine-slot colour set. mono halves the opacities and disables hue drift
colors string[]-Up to nine CSS colours overriding the palette slots in order
strength number1Overall intensity, 0 to 1
radius number16Corner radius in px applied to the wrapper and every layer
speed number1Multiplier for the breathing and drift periods
tone "dark" | "light""dark"Opacity, brightness and saturation preset for the surface the card sits on
hueShift booleantrueSlowly rotate all hues over a 14 to 16 second cycle
brightness number-Override the preset brightness filter
saturation number-Override the preset saturation filter
onfadein () => void-Called once the fade-in has completed
onfadeout () => void-Called once the fade-out has completed and the loop has stopped
ref HTMLDivElement | nullnullBindable wrapper element
class string-Additional classes on the wrapper

Slots

SlotDescription
children Content the glow wraps; give it an opaque background and the same radius