# Vitrum
> Refractive glass UI components for React 19, drawn in WebGL2. Usage docs only: install the packages from npm; component source is not published.
## Quick start
```bash
npm install @vitrumui/react # or: npx @vitrumui/cli init
```
```tsx
// app entry: the stylesheet once, then the provider around your app
import '@vitrumui/react/styles.css'
import { VitrumProvider } from '@vitrumui/react/theme'
import { GlassButton } from '@vitrumui/react/button'
export function App() {
return (
Continue
)
}
```
## Licence key
Free for non-commercial use; production builds without a key show a small "non-commercial" badge (never on localhost). For commercial use, buy a key at https://vitrum.noddev.tech/pricing; it is emailed instantly after checkout. Activate it offline:
```bash
npx @vitrumui/cli activate
```
This writes `NEXT_PUBLIC_VITRUM_LICENSE_KEY` (Next.js), `VITE_VITRUM_LICENSE_KEY` (Vite, TanStack Start) or `VITRUM_LICENSE_KEY` to `.env.local`. Or call `setLicenseKey(key)` from `@vitrumui/react` before the first render. `npx @vitrumui/cli doctor` checks the setup.
## Rules for AI agents
1. Install `@vitrumui/react` (or run `npx @vitrumui/cli init`), import `@vitrumui/react/styles.css` once in the app entry, and import the documented components from `@vitrumui/react` or their subpaths. Never re-implement the glass shader or the spring physics.
2. Customise through documented props, `` / `createGlassTheme()` (`@vitrumui/react/theme`), class names and CSS variables.
3. For glass on your own elements (navbars, docks, cards, modals), use `useGlass()` or `` from `@vitrumui/react/surface`.
4. Pick a component by its verb; they never overlap: GlassButton (press), GlassActionButton (merge), GlassTabs (travel), GlassBadge (flow), GlassSlideToConfirm (drag), GlassCard (hold), RangeSlider (slide), Switch (flip), Checkbox (tick), GlassSelect (stretch), GlassButtonGroup (share), GlassDropdownMenu (open), GlassPopover (unfold), GlassMenu (grow), GlassSearch (bud). RangeSlider, Switch and Checkbox need `three` as an optional peer dependency.
5. Requirements: React 19. Use only what these docs list: anything under "Not available yet" does not exist in the packages, so don't import it or invent its API.
## Get started
- [Introduction](/docs/introduction.md): React components drawn in WebGL2.
- [Installation](/docs/installation.md): Install `@vitrumui/react` or run `npx @vitrumui/cli init` to set up Vitrum in your React app.
- [Licensing](/docs/licensing.md): Free for non-commercial use. A commercial key removes the badge, checked offline.
- [For AI agents](/docs/ai.md): Machine-readable docs and a skill, so assistants use the real package APIs instead of re-implementing glass.
## Guides
- [useGlass / GlassSurface](/docs/custom-glass.md): Give any custom component — cards, navbars, floating docks, or modals — Vitrum's real-time WebGL2 refraction with `useGlass()` and ``.
- [VitrumProvider / createGlassTheme](/docs/theming.md): Adapt every Vitrum component and custom `` to your brand with ``, 5 curated glass presets, `createGlassTheme()`, and `--vitrum-*` CSS variables.
- [@vitrumui/cli](/docs/cli.md): Set up Vitrum in one command, activate commercial license keys offline, and audit your project with `npx @vitrumui/cli`.
## Components
- [GlassButton](/docs/button.md) (`@vitrumui/react/button`): A button made of glass. Clear glass bends the page behind it; tinted glass takes your background colour.
- [GlassActionButton](/docs/action-button.md) (`@vitrumui/react/action-button`): A button for one async action. Its arrow floats apart as a glass droplet; press it and the droplet melts into the body, and stays.
- [GlassTabs](/docs/tabs.md) (`@vitrumui/react/tabs`): A segmented control whose selection travels as a glass lens.
- [GlassBadge](/docs/badge.md) (`@vitrumui/react/badge`): A small glass badge with its text flowing through the lens.
- [GlassSlideToConfirm](/docs/slide-to-confirm.md) (`@vitrumui/react/slide-to-confirm`): A slide-to-confirm track. Drag its glass thumb to the end to run one deliberate action; let go early and it springs back.
- [GlassCard](/docs/card.md) (`@vitrumui/react/card`): A card made of frosted glass. Your content sits on it; its face blurs and tints whatever lies behind so the text stays readable, and its rim pulls it towards the centre.
- [RangeSlider](/docs/slider.md) (`@vitrumui/react/controls/range-slider`): A range slider with a glass thumb: a small pill at rest that opens into a wide lens while you hold it.
- [Switch](/docs/switch.md) (`@vitrumui/react/controls/switch`): An on/off toggle whose knob swells into a clear lens while it crosses the track.
- [Checkbox](/docs/checkbox.md) (`@vitrumui/react/controls/checkbox`): A checkbox under a cap of clear glass: the box and its mark are always seen through the lens.
- [GlassSelect](/docs/select.md) (`@vitrumui/react/select`): A select whose list swells out of its button as one body of glass, holds on by a neck that stretches and snaps, and closes by the same motion played backwards.
- [GlassButtonGroup](/docs/button-group.md) (`@vitrumui/react/button-group`): Related actions in one body of glass. The buttons share a single lens: point at any of them and the whole body swells.
- [GlassDropdownMenu](/docs/dropdown-menu.md) (`@vitrumui/react/dropdown-menu`): A menu of actions that swells out of the control that opens it as one body of glass: a button of its own, or a whole Button Group.
- [GlassPopover](/docs/popover.md) (`@vitrumui/react/popover`): A small refractive glass surface that unfolds straight out of its trigger button, holding quick controls, pickers or short details without leaving the page.
- [GlassMenu](/docs/menu.md) (`@vitrumui/react/menu`): A directional refractive glass menu whose container grows out of its trigger on any side — top, right, bottom or left — with labels, icons, shortcuts and keyboard navigation.
- [GlassSearch](/docs/search.md) (`@vitrumui/react/search`): A refractive glass search field that looks in several layers at once — apps, files, people — and opens into its ranked results, with its layers budding off the field as droplets.
## Not available yet
Planned, not shipped, and subject to change. None of these can be installed or imported today:
- **Overlays** (unavailable): Modal, AlertDialog, Drawer, Toast, Tooltip. Glass that floats over the page: dialogs, sheets, notices and hints.
- **Forms** (unavailable): Input, TextArea, SearchField, NumberField, InputOTP, RadioGroup, CheckboxGroup, Combobox, Form fields. Text entry and choice controls in glass.
- **Everyday components** (unavailable): Accordion, Breadcrumbs, Pagination, Progress, Skeleton, Spinner, Alert, Avatar, ToggleGroup, and more. The rest of a complete app, so you don't need a second UI kit.
- **Vitrum Motion** (unavailable). Glass-aware enter and exit, springs and animated text, built on the same springs as the components.
- **Vitrum Pro** (unavailable): Cinematic motion, AI Agent Kit, Data & charts, Templates. Larger pieces for whole products.
- **MCP server & agent skills** (unavailable). Let coding agents search the docs, read props and set up components, without ever seeing source.
- **Plus and Enterprise licences** (unavailable). Licences that include Vitrum Pro, and terms for larger organisations.
## Glass Studio & Licensing
- [Glass Studio](https://vitrum.noddev.tech/studio): tune blur, refraction, tint and springs live, then export JSX, `vitrum.config.ts` or CSS tokens.
- [Pricing](https://vitrum.noddev.tech/pricing): Community $0 (non-commercial), Solo $79 (1 seat), Team $249 (5 seats). One-time, 12 months of updates, and you keep every version released in that window.
- [License Agreement](https://vitrum.noddev.tech/license)
- [Third-party notices](/third-party-notices.txt)
## Optional
- [Full documentation in one file](/llms-full.txt)
- [Changelog](/changelog.md)
- [Türkçe dokümantasyon](/tr/docs/introduction.md)