Foundation
Materials
The five material tiers behind every surface, from ultra-thin translucency to chrome, and how the surface style changes them.
Materials are CSS classes (glass-ultra-thin, glass-thin, glass-regular, glass-thick, glass-chrome) that read --ca-mat-<tier>-* tokens (blur, fill and shadow). Surface paints the same five tiers for you from its material and elevation props (elevation 1 to 5 maps to ultra-thin to chrome), and adds the refraction layer for material="liquid". Use the classes only for markup that is not a Surface.
<script>
import { Surface } from "@codeatlasdev/ui";
</script>
<Surface material="glass" elevation={4} tone="brand">Content</Surface>
The surface style on <html data-style> rewrites the --ca-mat-* tokens, so every material changes at once. solid is the default: no blur, opaque fills, no glow, hairline edges, so the tiers below differ only by fill and shadow. flat also drops the shadows, frosted keeps a lighter blur, and glass (the opt-in liquid look) has the full blur, mesh and glow. The demos on this page use material="glass", so they look the same under any style. Switch the style with colorScheme.setStyle(), see Theming. Browsers with prefers-reduced-transparency: reduce get opaque surfaces.
Components that blur but are not a Surface (the Tabs list, Chip, Toast, Rail, Panel, the DataTable menus) set data-ca-blur="<role>" on their element instead of declaring backdrop-filter, so <html data-style> drives them exactly like a material="auto" Surface. Roles are ultra-thin, thin, regular, thick, chrome, mat-thin, mat-regular, overlay, chrome-layer and tooltip; Use it the same way on your own elements, and never add will-change or isolation: isolate around them. list_surfaces in the MCP server lists the styles and which ones draw a blur.
The modal scrim (the ::backdrop of Dialog, AlertDialog, Sheet, Drawer, CommandPalette and DocsSearch) reads --ca-scrim-blur, which defaults to blur(4px) saturate(180%) under every style. Set --ca-scrim-blur: none on :root to drop the blur on all of them at once, for example in a WKWebView window that is transparent over a native view.
Glass tiers
All five thickness levels on a gradient backdrop.
Ultra thin
Subtle background hint
Thin
Light translucency
Regular
Default blur
Thick
Strong blur
Chrome
Heaviest blur and fill
Reference #226 · Pick in the gallery
Code
Button glass variants
glass-btn, glass-btn-prominent and glass-btn-clear for custom controls. They follow `data-style`, so the halo and blur disappear under `solid`.
Reference #225 · Pick in the gallery
Code
Tinted and glowing
`tone="brand"` tints the fill, `glow` adds a halo that only shows under styles that keep one.
Tinted
Glowing
Tinted + glowing
Reference #227 · Pick in the gallery