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
borderRadiusstring—Per-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
refractionModeRefractionMode'edge'Refraction direction mode
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 | false-60Light source angle in degrees for specular highlight. Set false to disable
glassBackgroundstring—Glass 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 and RefractionMode types are exported from the package:

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

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.

Refraction Modes ​

TypeDescription
edgeOriginal behavior; displacement follows the rounded edge normal. Default.
centerDisplacement points inward from each edge toward the shape centerline.
splitOuter and inner bezel halves bend in opposite directions with a neutral midpoint.

MIT Licensed