Introduction
Glass components for React, drawn by one WebGL2 shader.
Vitrum is a set of refractive glass UI components for React, drawn by one WebGL2 shader. Each does one thing the others don't. Install @vitrumui/react (coming soon) and use the components directly in your app.
Distance this week
Autumn update
Sliders, switches and checkboxes, now in refractive glass.
NewIstanbul
16°
Cloudy
H:19° L:15°
How it works
- Zero-dependency engine. One WebGL2 context for the whole page, no three.js required for the core components.
- Your DOM. The glass is a canvas behind your own elements, so any router, any styling and your own markup keep working.
- Free at rest. The render loop runs only while a spring moves and stops completely when nothing does.
Browser support
The glass needs WebGL2, which current desktop and mobile browsers have. Without it, or before the first frame, every component keeps its plain CSS look: never a blank box. With reduced motion the springs stand still and the badge text stops.
Customisation
Customise components through documented props, Tailwind utility classes (className, bg-*, text-*), and CSS variables (--vt-tint).