Skip to content

Glass

The material primitive. One element, two pseudo-layers: a refracting backdrop and a specular ring. Everything else in Vitrum is built from it.

Install

$ pnpm dlx shadcn@latest add https://vitrumui.vercel.app/r/glass.json

Render <GlassRoot/> once at the top of <body> to enable refraction. Without it, surfaces render in the frost engine.

Examples

Materials

filmrefracts
panerefracts
slabrefracts
veilfrost only

Tints

Neutral
Accent
Custom

API

<Glass />

PropTypeDefaultDescription
material"film" | "pane" | "slab" | "veil""pane"Optical weight of the surface.
tint"neutral" | "accent" | "none""neutral"Color cast of the material.
refractGlassFilterIdper materialPin a specific refraction preset.
sheenbooleanfalseSoft light that follows the pointer.
asChildbooleanfalseMerge the surface onto the child element.