CSS-first by default
Inspectable, themeable materials with an intentional opaque fallback.
Build cinematic, accessible product interfaces with 40 React components, neutral adaptive themes, CSS-first glass materials, and opt-in refraction for controlled media.
Published on npm · MIT · zero runtime dependenciesServer render · clear material
Drag frost to thicken the material. Thickness 0.78 · dispersion 0.018 · motion pendingThe surface adapts. The contract does not. OpenGlass keeps spectacle at the edges and interaction semantics at the center.
Inspectable, themeable materials with an intentional opaque fallback.
Real text, forms, focus, selection, and keyboard behavior.
Reduced motion, reduced transparency, forced colors, and capability policy.
From buttons and menus to dialogs, inputs, toasts, and navigation.
Neutral defaults, six presets, semantic colors, and safe foregrounds.
Opt-in owned-media refraction without burdening ordinary controls.
Each study isolates one job: protect text, reveal simulated thickness, or add restrained chromatic depth. The irregular outline makes those optics feel formed rather than synthetic.
The color and detail behind the pane soften while labels rendered above it stay sharp and high-contrast.
USEMenus, dialogs & toastsDistance from the edge becomes a thickness field: the core bends more, while the perimeter catches light. The rings are a diagnostic, not decoration.
MAP Geometry → refraction strengthCoral and teal separate at the boundary while the center remains neutral and legible. Reserve it for imagery and motion—not text surfaces.
USEOwned image & video surfacesOpen the overlays, change the data, scrub the media, and move through the workflow. These are the same exported recipes consumers receive.
Contours reveal the thickness field. Distortion turns that field into visible optical displacement.
Every primitive is interactive in the full catalog, built with semantic DOM, and governed by the same neutral token system.
Open the complete component catalogEvery control above is the shipped component. Tab into it, type in it, and it behaves the same way in your app.
Command surfaces, media, and direct manipulation.
Dense information with legible hierarchy.
Predictable authoring and form contracts.
State changes that remain clear and accessible.
One package, zero runtime dependencies, and React stays a peer so your app owns its version. Copy the command and you are three lines from a glass surface.
React and React DOM remain peers, so your application owns their versions.
Neutral light and dark tokens work immediately. Override colors when ready.
Import only what the surface needs; enhanced media remains an opt-in subpath.
npm install open-glass-ui react react-domimport "open-glass-ui/styles.css";
import { Button, Glass, GlassSystemProvider } from "open-glass-ui";
export function App() {
return (
<GlassSystemProvider
renderer="auto"
theme={{ appearance: "system" }}
>
<Glass material="frosted">
<Button variant="primary">Create project</Button>
</Glass>
</GlassSystemProvider>
);
}A compact integration prompt tells an agent which facade to use, when enhanced optics are appropriate, and which accessibility behavior must stay intact.
Use the public open-glass-ui facade and import open-glass-ui/styles.css once. Default to CSS-first renderer="auto". Keep all controls as semantic DOM. Use the existing forty recipes before creating custom controls. Require accessible labels, preserve keyboard behavior, reduced motion/transparency, and forced-colors fallbacks. Use open-glass-ui/webgl only for an owned image/canvas/video source. Use open-glass-ui/core for server-safe pure utilities. Keep Next.js server output deterministic.
Geometry, policy, theming, package contracts, and native interaction behavior.
Chromium, Firefox, and WebKit at desktop and mobile boundaries.
The CSS-first package root keeps advanced optics behind an explicit import.
Importing a single component pulls 12.8 KB of the 55.6 KB barrel, so unused components are shaken out rather than shipped.
Explore every live component, theme the system, and take a production-minded glass foundation into your next React project.