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:
| Prop | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | true | Turn the material off without unmounting children. |
| quality | auto | full | reduced | auto | Hardware hints choose a conservative effect profile. |
| theme | light | dark | system | inherited | Scoped 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 glassMake 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.
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.