Thrum materials
Crisp frosted glass for every surface in the library. Set data-material="frosted" on the page and menus, dialogs and cards turn translucent, with tunable transparency and blur and accessible solid fallbacks.
Install
npx shadcn@latest add https://thrumui.dev/r/thrum-material.jsonAdds lib/thrum-material.tsx. Nothing else in your project changes.
import { Thrummaterials } from "@/lib/thrum-material";Source
/**
* Surface materials. The styling lives in the CSS this item adds to the project's stylesheet:
* by default surfaces render solid, and setting `data-material="frosted"` on an ancestor
* (usually `<html>`) turns every `[data-surface]` element into frosted glass.
*
* Root CSS variables tune frosted glass live:
* - `--thrum-glass-transparency` (0% solid to 100% clear, default 45%)
* - `--thrum-glass-fog` (backdrop blur radius in px, default 20px)
*/
export type Material = "solid" | "frosted";
/** The order a material switch cycles through. */
export const MATERIALS: readonly Material[] = ["solid", "frosted"];Files and dependencies
- Adds
lib/thrum-material.tsx- Packages
- None
- Brings along
- Nothing
Changelog
- 1.0.0 · 2026-12-03First release.