Glassmorphism generator
Tailwind has no glass utility, so each value above maps to an arbitrary value in square brackets on the matching utility. Works in Tailwind v3 and v4 without touching the config.
Presets
Dial in blur, opacity, saturation and border, then read the frosted glass effect over a live gradient backdrop, or start from a preset. Copy the full CSS, webkit prefix included, or the Tailwind classes.
The anatomy of a glass surface
A convincing glass panel is really four ingredients working together. A semi transparent fill lets the background show through. A backdrop blur softens whatever is behind it. A gentle saturation boost makes the blurred colors feel richer, like real glass. And a thin bright border catches the light at the edge, which sells the illusion of a physical pane.
Get any one of these wrong and the effect collapses. Too much fill opacity and it stops looking like glass. No border and it looks like a plain blur. HueKit exposes all four so you can balance them by eye.
Using glassmorphism without hurting readability
Glass is beautiful but it fights legibility, because text sits over a busy, blurred backdrop. A few habits keep it accessible:
- Keep enough fill opacity that text stays readable over any backdrop.
- Use a strong, high contrast text color and confirm it in the checker.
- Reserve glass for cards and navigation, not long body copy.
Once you have a card you like, run your text color against the fill in the contrast checker to make sure it clears WCAG AA.
Three presets to start from
Each preset is a complete, balanced surface. Pick the one closest to the job, then adjust. These are the Tailwind classes each one produces:
- Frosted panel: Low fill, strong blur. The classic look, and it needs a colorful backdrop to read as glass. bg-[rgba(255,255,255,0.20)] backdrop-blur-[16px] backdrop-saturate-[160%] border border-[rgba(255,255,255,0.35)] rounded-[20px]
- Readable card: A heavier fill, so dark body text stays legible whatever passes behind it. bg-[rgba(255,255,255,0.70)] backdrop-blur-[20px] backdrop-saturate-[120%] border border-[rgba(255,255,255,0.60)] rounded-[16px]
- Dark overlay: A dark tint for navigation and captions over bright imagery. Pair it with white text. bg-[rgba(15,15,18,0.45)] backdrop-blur-[12px] backdrop-saturate-[150%] border border-[rgba(255,255,255,0.15)] rounded-[14px]
Tailwind has no glass utility, so every value maps to an arbitrary value in square brackets on the utility that sets it: the fill on bg-[...], the blur on backdrop-blur-[...] and so on.
Frequently asked questions
What is glassmorphism?
Glassmorphism is a UI style where a panel looks like frosted glass. It blurs whatever sits behind it, adds a light translucent fill and a thin bright border, so the surface feels layered above the background.
How does backdrop-filter work?
The backdrop-filter property applies effects like blur and saturate to the area behind an element, not the element itself. Combined with a semi transparent background, that is what creates the frosted look.
Does glassmorphism work in every browser?
Modern browsers support backdrop-filter, and HueKit includes the -webkit- prefix for wider coverage. Always provide a solid fallback background for browsers that do not support it.
Why does my glass card look flat?
Glass only reads as glass when there is something interesting behind it. Place the card over an image or a colorful gradient, and make sure the fill opacity is low enough to let the backdrop show through.
Is there a Tailwind class for glassmorphism?
Not a single one. The effect is a translucent background, a backdrop blur, a saturate filter, a light border and rounded corners, and HueKit writes each as an arbitrary value such as backdrop-blur-[14px]. The classes work in Tailwind v3 and v4 without config.
Related tools
Last updated by FusionStudios. Every value on this page is computed by the same functions the tools use. How this is calculated.