Effects Fancy Stable

LiquidGlass

Glass-like visual effect using SVG filters for chromatic displacement

Preview

Installation

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

Usage

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

<LiquidGlass />

Examples

Basic Usage

Landing Page Navbar

Landing page with a liquid glass pill navigation.

Props

PropTypeDefaultDescription
radius number16Border radius in pixels
border number0.07Border thickness as fraction of min dimension
lightness number50Background lightness percentage
displace number-Optional Gaussian blur on the displacement output
blend string"difference"SVG blend mode for the displacement channels
xChannel "R" | "G" | "B""R"X displacement channel selector
yChannel "R" | "G" | "B""B"Y displacement channel selector
alpha number0.93Background fill alpha
blur number11Blur applied to the background fill layer
rOffset number0Red channel displacement offset
gOffset number10Green channel displacement offset
bOffset number20Blue channel displacement offset
scale number-180Displacement scale
frost number0.05Frosted glass opacity
fallbackBlur number20Backdrop blur in pixels for the Safari fallback
fallbackSaturation number180Backdrop saturation percentage for the Safari fallback
containerClass string""CSS classes for the outer container

Slots

SlotDescription
childrenContent rendered inside the glass effect