Glass and backdrop

Docs

Glass gives cards, dialogs, popovers and menus a translucent fill and a blur. The backdrop paints soft colour blobs behind the page, which glass then blurs. Both are optional: a project without them draws solid surfaces on a plain page.

How to use it

Open the Semantic tab and the glass group. It shows two parts, each with Add when the project lacks it.

Glass. Add makes four semantics, glass (the fill for cards), glass-strong (the fill for dialogs, menus and popovers), glass-border (the hairline) and glass-blur (a blur step), plus the Design tab's blur steps sm, md, lg and xl (4, 8, 12 and 24px) when they are missing. It starts from DS source's own values and puts the card, dialog, popover and menu on glass. The Painted on checkboxes add or take away a surface, sheet and toast included.

Backdrop. Add makes backdrop-1 to backdrop-3, three blobs in each theme. The preview draws them behind the page.

While creating. Ask the wizard's chat for glass or a backdrop ("make the cards glass") and it adds them to the design system it is building; its option cards never do on their own. A backdrop made there takes your brand and accent colours. A site audit puts on glass the surfaces the site blurs, and Make new from a Figma file the surfaces whose components or effect styles carry a background blur; both add a backdrop when the page behind has two or more colourful glows.

Every colour is an ordinary translucent design colour (oklch(1 0 0 / 0.55)), edited with the other rows as unsaved changes. Remove takes a group away after a confirm and puts each surface back on its solid fill. Adding, removing and ticking take effect at once and are not unsaved edits.

How it works

A surface is glass when its bg points at glass or glass-strong and its blur points at glass-blur. The kit reads the blur as backdrop-filter: blur(…) saturate(1.5); a surface without a blur token draws no blur at all.

Text on glass is graded where it lands: the fill over your page colour and, with a backdrop, over each blob, the worst counting. The contrast check adds Text on glass, Text on strong glass and an advisory Glass border. A surface on glass counts as following its tokens in the score.

Exports carry the groups like any other tokens: --glass, --glass-blur, --blur-xl and the backdrop colours, per theme. The kit's PageBackdrop component draws the blobs; mount it once at the top of a page. In Figma, Sync & build adds a background-blur effect style (semantic/glass-blur) and a backdrop paint style (semantic/backdrop), and blurs the kit's glass surfaces.

What can go wrong

  • The glass group needs a semantic named …: glass and the backdrop are whole groups, so a single member cannot be added, renamed away or deleted on its own. Use Add and Remove.
  • … points at the glass; point it elsewhere first: a token outside the group still uses one of its colours, so Remove waits until it does not.