backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); background: rgba(255, 255, 255, 0.20); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
layout.css.backdrop-filter.enabled in about:config. Always include -webkit-backdrop-filter for Safari.CSS Glassmorphism Generator — Frosted Glass Effect Builder Online
What's included
Features
About this tool
Build a CSS Frosted Glass Effect Visually — backdrop-filter, Opacity, Border — Copy CSS, Tailwind, or React
You want the frosted glass card effect from Apple's macOS — blurring whatever's behind the element and tinting it semi-transparent — but getting the four properties to work together without a visual preview means guessing blur values and toggling opacity until something looks right. Adjust the sliders here and watch the glass update live over a colorful gradient.
The full glassmorphism effect needs four CSS properties working together: `backdrop-filter: blur()` for the frosted blur, `background: rgba()` with low alpha for the translucent tint, a translucent `border` to simulate the light-catching glass edge, and `box-shadow` for depth. This tool gives you individual controls for every parameter — blur amount (0–30px), saturation boost (100–250% for Apple-style vibrancy), background tint color and opacity, border width and rgba opacity, border radius, and shadow blur and opacity.
Eight component presets — Card, Navbar, Button, Modal, Badge, Sidebar, Dark Glass, and Frosted — load production-ready starting points for the most common glassmorphism UI patterns. Preview over four gradient backgrounds (Cosmic, Sunset, Ocean, Aurora) or upload your own image. Export as CSS with -webkit-backdrop-filter for Safari, Tailwind utility classes with backdrop-blur-* and bg-white/20 syntax, or a React inline style object. A browser compatibility panel flags the Firefox caveat — backdrop-filter is opt-in behind a flag — before you ship.
Step by step
How to Use
- 1Start with a presetClick one of the eight component presets at the top — Card, Navbar, Button, Modal, Badge, Sidebar, Dark, or Frosted. Each preset loads production-ready values tuned for its use case. Card is the general-purpose starting point for most glassmorphism uses.
- 2Adjust backdrop blur and saturationIn the Backdrop section, use the Blur slider (0–30px) to control how frosted the glass looks — 8–20px produces the most realistic effect. Use the Saturate slider (100–250%) to boost the color vibrancy of blurred background content, matching the Apple Vibrancy style at 150–200%.
- 3Set the tint color and opacityIn the Background section, use the color picker to choose the tint — white (#ffffff) for light glass, black (#000000) for dark glass, or any custom color for amber, blue, or pink tinted glass. Set Opacity to 10–30% for a typical glass transparency; higher values make the panel more opaque.
- 4Configure the borderIn the Border section, set Width to 1 for the standard glass edge (0 disables it). Use the Color picker to choose a border tint (white is the standard choice) and set Border Opacity to 20–35% for a subtle light-catching edge. Use the Radius slider for corner rounding — 16px for cards, 0 for navbars, 100px for badge pills.
- 5Add depth with a shadowIn the Shadow section, increase Blur to 20–32px and Opacity to 10–20% for a natural drop shadow that lifts the glass element off the background without overpowering the frosted effect.
- 6Test over different backgroundsClick the gradient presets in the preview header — Cosmic (purple-blue), Sunset (pink-orange), Ocean (blue-teal), or Aurora (green-blue). Click the Upload button to use your own image. The preview updates live with each change.
- 7Export the codeSwitch between the CSS, Tailwind, and React tabs in the output panel. CSS includes -webkit-backdrop-filter for Safari. Tailwind generates backdrop-blur-* and bg-white/20 utility classes. React gives an inline style object. Click Copy to copy the output.
Real-world uses
Common Use Cases
Got questions?
Frequently Asked Questions
CSS glassmorphism is a UI design trend that creates a frosted glass appearance by combining three key CSS properties: backdrop-filter: blur() to blur the content behind the element, a semi-transparent background using rgba() or background with low opacity, and a translucent border using rgba() border colors. The result is an element that appears to be made of frosted glass — you can see distorted, blurred versions of whatever is behind it. The effect became popularized by Apple's macOS Big Sur design language in 2020 and has since become one of the most widely used UI effects in modern web design. The technique works best when placed over colorful, high-contrast backgrounds — gradient images, photography, or abstract color fields — that give the blur something visually interesting to work with.
CSS glassmorphism requires four properties working together. First, backdrop-filter: blur(Xpx) creates the frosted blur by applying a Gaussian blur to everything rendered behind the element — the higher the value, the more frosted the appearance. Second, background: rgba(R, G, B, A) with a low alpha value (typically 0.1 to 0.3) gives the element a translucent tint over the blurred background. Third, border: 1px solid rgba(255, 255, 255, 0.2) adds a subtle white or light border that catches light and enhances the glass illusion. Fourth, box-shadow with low opacity adds depth and separation from the background. The -webkit-backdrop-filter prefix is required for Safari compatibility. Together these four properties produce the characteristic layered, frosted glass appearance.
Firefox does not support the backdrop-filter CSS property by default. Starting with Firefox 70, users can enable it manually by navigating to about:config in the address bar and setting layout.css.backdrop-filter.enabled to true. This means glassmorphism effects appear as plain semi-transparent boxes without blur in Firefox for the majority of users who have not changed this setting. As a fallback, you can use a slightly more opaque background color so the element remains readable without the blur. Firefox has indicated that support may be enabled by default in a future release, but as of current versions it remains opt-in only. Always test your glassmorphism designs in Firefox alongside Chrome and Safari.
The CSS saturate() function, when combined with backdrop-filter, boosts the color intensity of the blurred background content. Adding backdrop-filter: blur(16px) saturate(180%) makes the colors behind the glass element appear more vivid and vibrant compared to blur alone. This is a technique borrowed from Apple's UI design — the "Vibrancy" effect on macOS and iOS uses exactly this combination of blur and saturation boost to create panels that feel deeply connected to the colors behind them rather than just blurry. Typical values range from 130% to 200%. Values below 100% desaturate the background, creating a more muted, foggy glass appearance. Values of 150–200% produce the most visually striking frosted glass effect.
The glassmorphism border is typically a thin, semi-transparent white or light-colored line that simulates the beveled edge of real glass catching light. Use border: 1px solid rgba(255, 255, 255, 0.25) as a standard starting point. The rgba() color value lets you control both the border color and its transparency — using white at 20–30% opacity creates a subtle shimmer that reinforces the glass illusion without looking like a solid border. For dark glass effects (dark tinted backgrounds), the border might use a lighter shade of the tint color rather than pure white. Border-radius should match your design — values of 12–20px work well for cards and modals, while 0 is appropriate for full-width panels and navbars. Higher border opacity makes the glass look thicker and more defined; lower values create a more subtle, barely-there effect.
Tailwind CSS provides built-in utility classes for glassmorphism. Use backdrop-blur-lg or backdrop-blur-xl for the blur effect (corresponding to 16px and 24px respectively). The bg-white/20 utility sets a white background at 20% opacity — the number after the slash is the opacity percentage. For borders, border border-white/25 adds a 1px white border at 25% opacity. Combine rounded-2xl for 16px border radius and shadow-xl for the drop shadow. A typical glassmorphism card class string looks like: backdrop-blur-lg backdrop-saturate-150 bg-white/20 border border-white/25 rounded-2xl shadow-xl. For values not in Tailwind's default scale, use arbitrary values: backdrop-blur-[18px] or bg-white/[0.18]. The generator's Tailwind tab outputs the exact class string you need.
Glassmorphism works best over colorful, vibrant backgrounds that give the blur effect something visually interesting to work with. The classic choice is a multi-color gradient — purple-to-pink, blue-to-teal, or multi-stop gradients work exceptionally well because the blurred gradient colors create beautiful color transitions inside the glass panel. Photography with high color contrast also works well. Backgrounds that are too dark or monochromatic tend to make the glass appear as just a blurry dark panel with no visible frosted effect. If using photography, prefer images with multiple distinct color regions so the blur creates visible color mixing. Abstract art, bokeh photography, and gradient meshes are the ideal glass backgrounds. Avoid using flat single-color backgrounds as they will make the glass element invisible — there is nothing to blur.
CSS backdrop-filter causes the browser to composite the element on its own GPU layer and apply the blur as a post-processing effect on the captured background pixels. This GPU compositing means it can have significant performance implications. Large blur values (above 20px) on large elements are particularly expensive because the GPU must blur a larger pixel area. Applying backdrop-filter to a fixed-position or sticky navbar that spans the full viewport width and scrolls with the page can cause jank on lower-end mobile devices because every scroll frame requires re-blurring the background pixels. For best performance: keep blur values at or below 16px, avoid applying backdrop-filter to full-screen elements, use will-change: backdrop-filter to hint the browser before applying animations, and test on mid-range Android phones where GPU performance is most constrained.