Skip to content
Thrum

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.json

Adds lib/thrum-material.tsx. Nothing else in your project changes.

import { Thrummaterials } from "@/lib/thrum-material";

Source

lib/thrum-material.tsx
/**
 * 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. 1.0.0 · 2026-12-03First release.

Loading index…

Keyboard shortcuts

/Ctrl KSearch components, docs and actions
?Show this list
AAppearance studio
SSound on or off
MFull or reduced motion
TTheme: auto, light, dark
GSurface: solid or frosted
BBackdrop photograph (under glass)
CCorner radius: square to round
RReplay the demo, on a component page
DDraw new data, on a component page
←→HomeEndMove the cursor in a focused chart
EscClose a dialog, or leave a chart cursor