Guide
Make a shadcn/ui app glassy with one command
Install the Glassy UI theme for shadcn/ui to restyle your existing components as glass in your palette, with no code changes.
Install it
The Glassy UI theme restyles the stock shadcn/ui components your app already has. Run one command in a shadcn/ui app on Tailwind CSS 4:
pnpm dlx shadcn@4.14.1 add @glassyui/glassy-themeThe command was tested with shadcn CLI 4.14.1.
Before it writes anything, the CLI warns that a theme overwrites existing CSS variables and components. This one changes neither, so answer yes. It writes CSS only: it adds --glassy-* tokens next to your palette, two easing curves to @theme inline and one @layer glassy block inside @layer components. Every tint comes from your own colours: a black --primary gives black glass, a blue one blue glass.
What it looks like





Buttons become raised glass with a soft shadow and set down when pressed. Cards and alerts frost what lies behind them and light their rims. Inputs, textareas and select triggers become recessed fields. Switches, sliders and tabs get glass knobs and a glass indicator.
The glass takes its colour from your palette’s --primary; a grey palette keeps it clear.
In Chromium browsers, cards, alerts and outline, secondary and ghost buttons also bend the page along their rims, using the lens of Glassy UI’s own components. Coloured buttons, Safari and Firefox show the frost without the bend.
Which components change
Button, badge, card, alert, kbd, skeleton, avatar, input, textarea, select, dropdown menu, popover, tooltip, dialog, sheet, command, tabs, switch, slider, checkbox and radio group. They were tested in Chrome on two stock apps, new-york on Radix and base-nova on Base UI, and on new-york in shadcn’s blue, violet, orange and yellow themes. WebKit and Firefox were checked to keep the frost and leave out the bend. Other styles use the same slots but are untested.
Everything else keeps its stock look, including accordion, context menu, menubar, navigation menu, hover card, sidebar, drawer, toggle group, progress and toasts. Buttons that open a menu, dialog, popover or sheet turn to glass like the rest. The theme tells button variants apart by their data-variant attribute, or by their stock classes where a button has none, as on base-nova and in buttons copied before shadcn added it. A button whose variant classes you rewrote may keep its stock look.
Tune it
Lower the tint for clearer coloured glass, or raise the surface when cards sit over a busy image. Put the tokens in :root for light mode and .dark for dark mode:
:root {
--glassy-tint: 84%; /* tinted buttons, badges and checked controls */
--glassy-surface: 72%; /* cards, menus, popovers and dialogs */
}The other tokens set the blur (--glassy-frost; --glassy-lens-frost where the rims bend, in Chromium; and --glassy-float-frost for menus, popovers, selects, dialogs and sheets), the colour boost behind it (--glassy-saturate), the field fill (--glassy-field), rim light and shade (--glassy-rim, --glassy-shade), the sheen across buttons and tab tracks (--glassy-sheen) and across cards and alerts (--glassy-pane-sheen), the shadow colour as an r g b triplet (--glassy-shadow), how far tinted buttons and badges push their colour away from their label, deeper under a light label and paler under a dark one (--glassy-tint-depth), how strongly button edges split into red and blue (--glassy-rim-split, 0 for none), and how far the selected tab’s pill leans toward your text colour (--glassy-pill-lift).
The bend at the rims has no token. To keep the frost and drop the bend, delete the @supports (-webkit-app-region: drag) block inside @layer glassy. Only Chromium matches that query.
Your classes still win
The theme sits below Tailwind’s utilities, so a class you write on a component keeps winning, as it did before. Fields draw their fill as a background image and their rim as an inset shadow, so clear those first when you restyle one. In Chrome and Edge, buttons widen a little past their label so their round ends have room; min-w-0 gives one shadcn’s width back:
<Input className="bg-none bg-amber-50" /> {/* your own field colour */}
<Input className="inset-shadow-none" /> {/* no recessed rim */}
<Card className="bg-white" /> {/* your own card colour */}
<Button className="min-w-0">Save</Button> {/* shadcn's own width */}Accessibility
With Reduce Motion on, the themed components and accordions stop sliding, springing and fading, the stock open and close animations included; each one lands in its end state. With Reduce Transparency, Increase Contrast or a forced-colours mode on, the glass turns into solid fills in your palette with plain borders; forced colours use your system colours.
On plain light and dark pages, in shadcn’s neutral, blue, violet, orange and yellow themes, labels on glass buttons, badges, tabs, keys, cards, alerts and menus keep at least 4.5:1 contrast, measured from the rendered pixels in Chrome. Disabled buttons, which WCAG exempts, are the exception. Where shadcn/ui’s own colours already fall short, as base-nova’s soft destructive badge does at 3.8:1 and the orange theme’s buttons at 2.6:1, the theme keeps or raises their contrast. Over a photo or illustration, contrast depends on the image: raise --glassy-tint and --glassy-surface until your labels read clearly.
Remove or upgrade it
Delete the @layer glassy block, the --glassy-* lines in :root and .dark, and the --ease-glassy-* lines in @theme inline. To upgrade, remove them first, then run the install command again: the shadcn CLI adds and updates rules but never deletes old ones.
Get Glassy UI’s components instead
The theme keeps shadcn/ui’s look and draws one lens per size. To turn your components into Glassy UI’s own, with its look, its sizes and, on buttons, cards, alerts, tabs and floats, the lens measured for each element’s exact size and corners, install the drop-in set for your style instead of the theme:
pnpm dlx shadcn@4.14.1 add @glassyui/glassy-ui-new-york --overwriteOn base-nova, which uses Base UI, install @glassyui/glassy-ui-base-nova instead. Each drop-in keeps shadcn/ui’s exports, props and data attributes for your style, so your imports and call sites stay as they are, Server Components included. Glassy UI’s blue becomes your palette’s primary colour. The engine goes into components/glassyui; only Chromium draws the lens, and Safari and Firefox keep the frost. Tune the glass of menus, selects, popovers, dialogs and sheets with --glassy-slab (the fill), --glassy-slab-frost and, for dark mode, --glassy-slab-brightness and --glassy-slab-rim-brightness.
Glassy UI’s sizes come with its look, so layouts grow: fields are 52 px tall, buttons 44 px and the tabs list 48 px. The set replaces sixteen files in components/ui: button, card, alert, badge, input, textarea, select, checkbox, radio group, switch, slider, tabs, dropdown menu, popover, dialog and sheet. --overwrite replaces your edits in them too, so commit first. If you installed the theme, delete its @layer glassy block and its --glassy-* lines first. To go back, restore the files from git and delete components/glassyui.
What needs Glassy UI’s components
Some effects need more than shadcn/ui’s components, so they stay with Glassy UI’s own components: refraction in Safari and Firefox over a backdrop you supply, a glow that lands where you press, a bubble you can drag between segments, and springs that keep their speed when you change direction mid-move.