Alpha EnhancementReact 18 & 19Zero Runtime CSS

Glass

An optional material scope for adaptive frost, lighting and ordinary DEVVY components.

Interactive preview

Clarity with a little depth.

Explore the full material lab at /ui/glass.

Usage

import { Glass, Card, CardContent } from "@devvy-ui/react";

<Glass quality="auto" theme="dark">
  <Card><CardContent>Your next idea.</CardContent></Card>
</Glass>

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
enabledbooleantrueTurn the material off without unmounting children.
qualityauto | full | reducedautoHardware hints choose a conservative effect profile.
themelight | dark | systeminheritedScoped light or dark token set.

Accessibility & behavior

Platform Behavior & Guidelines

Import @devvy-ui/styles/glass.css explicitly. Opaque SSR markup enhances after hydration. Reduced transparency, contrast and forced-color preferences override effects. See /ui/glass for the complete material lab.

Source ownership

Add the audited implementation directly into your repository with the CLI:

node /path/to/devvy-ui/packages/cli/src/cli.mjs add glass

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

Glass.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.