Skip to content

API Reference

Liqvued Component

The <Liqvued> component wraps content in a liquid glass effect using SVG filter primitives. It accepts the following props:

Props

PropTypeDefaultDescription
asstring | Component'div'HTML tag or Vue component to render as (rendered as a child of the glass root)
asPropsobject{}Props passed to the rendered element/component
radiusnumber32Corner radius in pixels
borderRadiusstringPer-corner border-radius CSS value (e.g. "10px 20px 10px 20px"); overrides radius
bezelnumber22Width of the displacement bezel in pixels
thicknessnumber42Maximum displacement magnitude in pixels
refractionnumber1Refraction index multiplier
magnificationnumber0Center magnification amount. Positive values enlarge, negative values shrink
magnificationFocusnumber0.82Focus radius of the magnification area. Lower values keep the lens tighter
blurnumber0.4CSS backdrop-filter blur amount
surfaceSurface'convex'Glass surface profile shape
specularOpacitynumber0.45Opacity of the specular highlight
glareAnglenumber-60Light source angle in degrees for specular highlight
glassBackgroundstringGlass panel background color (auto-derived from asProps.color when available)
fallbackOnlybooleanfalseWhen true, disables the SVG displacement effect and uses only CSS blur

Slots

The component provides a single default slot:

vue
<Liqvued>
  <p>Content rendered on the glass surface</p>
</Liqvued>

Types

The Surface type is exported from the package:

ts
import type { Surface } from 'liqvued'
ts
type Surface = 'convex' | 'concave' | 'lip' | 'bowl' | 'bevel' | 'saddle' | 'ripple' | 'noise' | 'asymmetric'

Surface Types

TypeDescription
convexSquircle convex profile — soft pill-like edges. Default.
concaveInverted convex profile — inward-curving dish-like refraction.
lipSmooth transition from convex at center to concave at edge — S-curve profile.
bowlDeeper concave profile with a more even inward pull.
bevelLinear edge ramp for harder, cleaner refraction.
saddleMirrored S-curve that changes direction through the middle.
ripplePeriodic wave modulation across the edge band.
noiseDeterministic irregular profile for organic glass distortion.
asymmetricBiased convex profile with more weight on one side of the edge band.

MIT Licensed