ZeroGravity UI

Surfacesstable

Frost

Glass surface

A frosted-glass surface for any content, with conservative blur and a cheap tint-only mode.

Now playingGlass over colour

The shapes behind stay soft; the text in front stays sharp.

Customize

Glassblur only, never saturate
tone
variant
12 pxblur
Shapeedge, corners and lift
20 pxradius
border
shadow

Usage

TSX
import { Frost } from "zerogravity/frost"

<Frost>
    <Card />
</Frost>

Generated from the controls above. Only props that differ from their defaults are shown.

Props

10 documented props on Frost
PropertyTypeDefaultDescription
tone"light" | "dark""light"Tone.
variant"blur" | "tint""blur"Variant.
blurnumber12Blur. Range 0 to 40 px.
radiusnumber20Radius. Range 0 to 48 px.
borderbooleantrueLight edge.
shadowbooleantrueShadow.
childrenReactNode—Whatever sits on the glass.
tintstringfrom toneAny CSS colour, var(--token) included.
tintOpacitynumberfrom toneTint strength, 0 to 1.
as"div" | "section" | "article" | "aside" | "header" | "footer" | "nav""div"Element rendered. Other HTML attributes and ref pass through.

Dependencies

0 external runtime dependencies

Ships with nothing but React.