Skip to content

Get started

Installation

Install `@vitrumui/react` or run `npx @vitrumui/cli init` to set up Vitrum in your React app.

Markdown

Requirements

  • React 19 (Next.js 15+, Vite, TanStack Start, React Router…)
  • Any styling setup: the compiled stylesheet works with or without Tailwind CSS.
  • Optional: three if 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.

terminal
npx @vitrumui/cli init

Or install by hand

Installation

npm install @vitrumui/react
Peer: React 19

Import the stylesheet once in your app entry, wrap the app in <VitrumProvider> to choose a theme, and use the components:

app.tsx
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

PackageVersionWhat it is
@vitrumui/react2.1.0The components. The one you install.
@vitrumui/core2.1.0The WebGL2 engine and the offline licence check. Installed with it.
@vitrumui/springs1.1.0Spring physics. Installed with it.
@vitrumui/cli1.0.2Setup, 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.