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
tonevariant12 px
blurShapeedge, corners and lift
20 px
radiusbordershadowUsage
import { Frost } from "zerogravity/frost"
<Frost>
<Card />
</Frost>Generated from the controls above. Only props that differ from their defaults are shown.
Props
| Property | Type | Default | Description |
|---|---|---|---|
tone | "light" | "dark" | "light" | Tone. |
variant | "blur" | "tint" | "blur" | Variant. |
blur | number | 12 | Blur. Range 0 to 40 px. |
radius | number | 20 | Radius. Range 0 to 48 px. |
border | boolean | true | Light edge. |
shadow | boolean | true | Shadow. |
children | ReactNode | — | Whatever sits on the glass. |
tint | string | from tone | Any CSS colour, var(--token) included. |
tintOpacity | number | from tone | Tint 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.