Avenra
Liquid GlassAPI Reference
Liquid GlassAPI Reference

API Overview

All exported symbols in @avenra/liquid-glass.

API Reference

Liquid Glass exports a variety of functions and classes, ranging from high-level component factories to low-level physics and SVG primitives.

ExportTypeDescription
createLiquidGlassfunctionCore factory — applies glass effect to any element
createLiquidButtonfunctionAnimated glass button
createLiquidSwitchfunctionToggle switch with spring thumb
createLiquidSliderfunctionHorizontal range slider
createLiquidCursorfunctionGlass orb that follows the mouse
createLiquidInputfunctionGlass-wrapped text input
createLiquidDialfunctionRotary dial / knob
createLiquidTooltipfunctionGlass tooltip that appears above a trigger
createLiquidProgressfunctionAnimated progress bar
initfunctionScan DOM and auto-init all data-liquid-* elements
SpringclassDamped spring physics primitive
PROFILESobjectBuilt-in surface profile functions
compute1DfunctionLow-level: 1D Snell's law displacement map
compute2DfunctionLow-level: 2D displacement ImageData
computeSpecularfunctionLow-level: specular highlight ImageData
buildMapsfunctionConvenience: run full pipeline, return data URLs
createFilterSVGfunctionLow-level: build SVG filter element
injectImagesfunctionLow-level: update displacement/specular images in filter
setScalefunctionLow-level: update feDisplacementMap scale at runtime
imageDataToURLfunctionConvert ImageData to a data: URL
nextFilterIdfunctionGenerate a unique filter ID string
supportsBackdropFilterfunctionFeature-detect SVG backdrop-filter support
maxDispfunctionMax absolute value in a 1D map

On this page