Skip to content

Get started

Introduction

React components drawn in WebGL2.

Markdown

Vitrum is a set of refractive glass UI components for React, drawn in WebGL2. Core surfaces share one zero-dependency WebGL2 engine, while RangeSlider, Switch and Checkbox use an optional Three.js WebGL2 renderer. Each component does one thing the others don't. Install @vitrumui/react and use them directly in your app.

How it works

  • Shared WebGL2 engine + optional Three.js controls. All core surfaces share one zero-dependency WebGL2 context (no three required). RangeSlider, Switch and Checkbox load Three.js only when mounted.
  • 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).