Backlight

An SVG filter wrapper that adds a soft, saturated backlight glow around the content it wraps.

Installation

pnpm dlx shadcn-svelte@latest add https://sv-animations.vercel.app/r/backlight.json

Usage

<script lang="ts">	import { Backlight } from "#lib/components/magic/backlight/index.js";</script>
<Backlight blur={20}>	<div class="rounded-xl bg-background p-8">Backlit content</div></Backlight>

Examples

Image

fancy gradient background

Svg

Props

Backlight

Wraps content in an SVG blur and saturation filter to create a glowing backlight effect.

NameTypeDefaultDescription
childrenSnippetundefinedThe content rendered inside the backlight wrapper.
classClassValueundefinedCustom classes applied to the outer wrapper element.
blurnumber10Controls the blur intensity used by the SVG filter.