Backlight
svelte-animations/backlightFreeBlock
An SVG filter wrapper that adds a soft, saturated backlight glow around the content it wraps.
Install it
npx shadcn@latest add https://sv-animations.vercel.app/r/backlight.jsonSource
1<script lang="ts">2 import type { Snippet } from "svelte";34 type Props = {5 children?: Snippet;6 class?: string;7 blur?: number;8 };9 let { children, class: className, blur = 10 }: Props = $props();10 let id = $props.id();11</script>1213<div class={className}>14 <svg width="0" height="0" aria-hidden="true">15 <filter {id} y="-50%" x="-50%" width="200%" height="200%">16 <feGaussianBlur in="SourceGraphic" stdDeviation={blur} result="blurred"17 ></feGaussianBlur>18 <feColorMatrix type="saturate" in="blurred" values="4"></feColorMatrix>19 <feComposite in="SourceGraphic" operator="over"></feComposite>20 </filter>21 </svg>22 <div style="filter: url(#{id})">23 {@render children?.()}24 </div>25</div>
Files it writes
More from Svelte Animations
All 66 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Beamanimated-beam | Svelte Animations | Blocks | Free | 1 dep · 6 files | |
| Animated Circular Progress Baranimated-circular-progress-bar | Svelte Animations | Blocks | Free | no deps · 2 files | |
| Animated Gradient Textanimated-gradient-text | Svelte Animations | Blocks | Free | no deps · 2 files | |
| Animated Grid Patternanimated-grid-pattern | Svelte Animations | Blocks | Free | 1 dep · 2 files | |
| Animated Listanimated-list | Svelte Animations | Blocks | Free | 1 dep · 2 files | |
| Animated Shiny Textanimated-shiny-text | Svelte Animations | Blocks | Free | no deps | |
| Animated Theme Toggleranimated-theme-toggler | Svelte Animations | Blocks | Free | no deps · 2 files | |
| Arc Timelinearc-timeline | Svelte Animations | Blocks | Free | no deps · 3 files |
