Installation
Install `@vitrumui/react` or run `npx @vitrumui/cli init` to set up Vitrum in your React app.
Requirements
- React 19 (Next.js 15+, Vite, TanStack Start, React Router…)
- Any styling setup: the compiled stylesheet works with or without Tailwind CSS.
- Optional:
threeif you use RangeSlider, Switch or Checkbox.
Set up with the CLI
In your project, run init. It detects your framework and package manager, installs @vitrumui/react, adds the stylesheet import and writes a vitrum.config.ts. --dry-run shows what it would change first.
npx @vitrumui/cli initOr install by hand
Installation
npm install @vitrumui/reactImport the stylesheet once in your app entry, wrap the app in <VitrumProvider> to choose a theme, and use the components:
import '@vitrumui/react/styles.css'
import { VitrumProvider } from '@vitrumui/react/theme'
import { GlassButton } from '@vitrumui/react/button'
export function App() {
return (
<VitrumProvider theme="frost">
<GlassButton material="tinted" className="bg-sky-500 text-white">
Get started
</GlassButton>
</VitrumProvider>
)
}Packages
| Package | Version | What it is |
|---|---|---|
| @vitrumui/react | 2.1.0 | The components. The one you install. |
| @vitrumui/core | 2.1.0 | The WebGL2 engine and the offline licence check. Installed with it. |
| @vitrumui/springs | 1.1.0 | Spring physics. Installed with it. |
| @vitrumui/cli | 1.0.2 | Setup, licence activation and checks. Run it with npx. |
Licence key
Free for non-commercial use. For commercial projects, get a key and run npx @vitrumui/cli activate <license-key>; see Licensing.
Dark mode
The glass reads its colours from your CSS (the nearest opaque background and the element's own colours), so it follows whatever theme system you use. Clear glass picks its text colour from the tone it ends up, so labels stay readable on light and dark backdrops alike.
Next.js
The component entries ship with "use client". Import them from server components as usual.