Backgrounds & Surfaces

Exploring page and component background treatments beyond solid colors: gradients, textures, glassmorphism, and animated backgrounds.

Token Reference See Themes > Extensions for token documentation. Source: src/tokens/extensions/surfaces.css

Surface Tokens

Tokens for texture overlays, glassmorphism effects, and page backgrounds.

Token Default Description
--surface-texture none Texture pattern: none | noise | grain | dots | lines
--surface-texture-opacity 0.05 Texture overlay opacity
--glass-blur 0px Glassmorphism blur amount
--glass-opacity 0.15 Glass background opacity
Page Background
--page-bg-type solid Background mode: solid | gradient | image
--page-bg-color var(--color-background) Solid background color
--page-bg-gradient none CSS gradient value (linear, radial, conic)
--page-bg-image none Background image URL
--page-bg-attachment scroll scroll | fixed
--page-bg-size cover cover | contain | auto
--page-bg-position center Background position value
--page-bg-blend normal Blend mode for compositing

Gradient Backgrounds

Various gradient techniques for hero sections, cards, and page backgrounds.

Linear

135deg diagonal blend

Radial

Circle from top-left

Conic

Color wheel effect

Mesh

Multiple radial overlays

Animated

Shifting background position

Layered

Highlight + base gradient

Texture Patterns

Subtle texture overlays that add depth and character to surfaces.

None

Clean, flat surface

Noise

SVG turbulence filter

Dots

Repeating dot pattern

Grid

Diagonal grid lines

Lines

Fine diagonal lines

Grain

Film grain effect

Glassmorphism

Frosted glass effect using backdrop-filter. Adjust the blur amount with the slider.

Glass Card

Semi-transparent with blur backdrop

Frosted

Works best on colorful backgrounds

Layered

Border adds subtle definition

Animated Gradients

Subtle movement for hero sections and featured content.

Hue Rotate

Filter-based color cycling

Pulse Glow

Breathing radial highlight

Wave

Rotating ellipse overlay

Page Background Tokens

The --page-bg-* token family controls rich body backgrounds. Themes override these tokens to create gradient backgrounds that complement their palette. The default theme uses --page-bg-type: solid with no visual change from the standard var(--color-surface) background.

Content Card

Switch themes to see how --page-bg-gradient creates rich backgrounds beneath content surfaces.