CSS Generators

Glassmorphism

All tools

Build a frosted glass card over a colorful background and copy the exact backdrop-filter settings.

How it works

Four simple steps

1

Set the blur

Drag backdrop blur until the background softens behind the card.

2

Tune tint and border

Adjust the white tint and border opacity for the glass edge.

3

Shape and saturate

Round the corners and boost saturation of the colors behind.

4

Copy the .glass rule

Copy the CSS, including the -webkit- line, or download glass.css.

Glassmorphism

About Glassmorphism

A pricing card sits on a gradient hero and should look like frosted glass, with the colors blurred through it. Getting blur, tint and border right by trial in the browser is slow. Use the sliders over a live gradient and copy the rule when it looks right.

Five sliders control the panel: backdrop blur (0 to 40 px), background opacity of the white tint (0 to 100 percent), border opacity (0 to 100 percent), border radius (0 to 48 px) and saturate (100 to 200 percent). The preview card sits on a four-color gradient so the blur is visible. The generated .glass rule includes a translucent white background, a 1 px translucent border, the radius, backdrop-filter with blur and saturate, the same value under -webkit-backdrop-filter, and a soft box shadow.

Glass only works when something interesting is behind it. On a plain white page the panel just looks grey, so test it on the real background. Keep the tint opacity low (10 to 20 percent) and the blur high enough that text behind the card cannot be read through it. Check the contrast of text on the panel at its lightest point, since the background changes as users scroll. The tint is always white; for dark glass, change rgba(255, 255, 255, ...) to a dark color in the copied rule. If you run your CSS through the vendor prefix cleaner, put the -webkit-backdrop-filter line back afterwards. For a different soft UI style, compare with the neumorphism shadow generator, or blend the background in the color gradient generator.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

backdrop-filter blurs what is behind the element. If the area behind is a flat color, there is nothing to blur. Also check that no parent has an opaque background directly behind the card.

Keep it. Safari supported only the prefixed property for years, and users on older versions still need it. It does no harm in other browsers.

It can on low-end devices, especially with large blur values on big or animated elements. Use it on a few panels rather than on every card in a long list.

View more FAQs

Related tools

View all

Tailwind Class Sorter

Sort Tailwind classes and detect conflicting utilities with a winner explanation.

Open

Design System Diff Lab

Diff design tokens and inspect CSS @layer order and selector specificity locally.

Open

SVG Path Inspector

Parse SVG path commands, preview on canvas, round and minify coordinates.

Open

Flexbox Generator

Build flex layouts visually.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools