Glass JS behaviour

Glass panel

A glass surface with a tint and a light-catching rim; refract bends the backdrop at the edge and follow-light carries the gleam after the pointer.

Real scenarios

The component as it is used in a product — not a specimen grid.

A player floating over the artwork

Rain in Istanbul Lo-fi for building design systems
lossless

Slide the volume — the panel stays a panel; only the light moves.

The four bodies

regular (the default), clear, frost and thick — same stage, four readings of the same backdrop.

regular regular
clear clear
frost frost
thick thick

Important props

Important props
Prop Type Default What it does
preset string regular The glass’ body: regular · clear · frost · thick.
refract bool true Bends the backdrop at the rim (the glassPane behaviour; finest in Chromium).
iridescent bool false A rainbow shimmer along the rim.
follow-light bool false The rim’s gleam follows the pointer.
as string div The root tag (e.g. article or section).

Snippet

<x-nx::glass-panel preset="frost" iridescent follow-light class="player-card">
    …محتوای کارت…
</x-nx::glass-panel>