StyleKit

Glassmorphism

玻璃拟态

Rate this style

Premium frosted glass with a nocturne temperament. Deep ink scenes and restrained light wells; the glass borrows light instead of carrying color — gaussian blur, saturation boost, lit top edges and film grain make glass that feels believable, not decorative.

glassmorphismfrosted glassbackdrop blurbackdrop-filter csstranslucent uiglass cardliquid glassdark glass themefilm grainglassmorphic dashboard

Best For

glassmorphism / frosted glass / backdrop blur

Primary Move

Use a deep ink night base (like #0B1322) with 2-3 soft large-radius light wells (radial gradients)

Watch Out

Do not use purple-pink AI gradients (#667eea, #764ba2, #f093fb style indigo-purple-pink combos)

design.md

Glassmorphism as a design document

One document describes the colour roles, type rules, spacing and component construction behind this style. Copy or download it into Claude Code or Codex.

Document view

Glassmorphism — Style Reference

Optics at night: glass has no color of its own — it borrows, bends and softens the light behind it.

Theme: dark

Glassmorphism is optics, not a palette. Real glass is colourless: it takes colour from the content layer and stays neutral itself, which is exactly the rule Apple's Liquid Glass follows. The system has three parts. First, a deep night canvas with two or three large-radius light wells — glass needs something to blur. Second, panels built from 5% to 12% white with 40px to 60px of backdrop-blur and 180% saturation. Third, direction of light: a 1px white inner highlight on the top edge, a 1px dark inner edge along the bottom, and a deep outer shadow. All three together produce thickness. The only permitted color is champagne gold, reserved for the primary CTA and key figures.

Colors

NameValueTokenRole
Night Deep#060a13--color-night-deepThe deepest layer: full-screen backdrops and base sections. Glass only reads when it floats above this.
Night#0b1322--color-nightThe default page ground, one step lighter than the deepest tone so adjacent sections separate without a second color band.
Night Steel#16233a--color-night-steelSecondary panels and input beds, for the places that need one more level beneath the glass.
Moon Steel#33517a--color-moon-steelSecondary text, chart contrast and dividers. The closest thing the night palette has to a structural line.
Moonlight#7c9cc4--color-moonlightHighlighted text, icons and data points — bright enough to register without competing with the CTA.
Champagne#e4b863--color-champagneThe only accent in the system. Reserved for the primary CTA, key figures and the single most important link.
Glass Fillrgba(255,255,255,0.08)--color-glass-fillPanel fill. Always translucent and never above 15%, or it degrades into a solid block.

Typography

Inter — The only face in the system. Hierarchy comes from weight (400/500/600) and size, never from a second family.
  • Substitute: SF Pro Display, system-ui, -apple-system, sans-serif
  • Weights: 400, 500, 600
  • Sizes: 12, 14, 16, 24, 40, 64
  • Line height: 1.05 (display), 1.15 (headings), 1.6 (body)
  • Letter spacing: -0.02em on display, 0.14em on uppercase labels
Type Scale
RoleFamilyWeightSizeLine HeightLetter SpacingToken
displayInter60064px1.05-0.02em--text-display
headingInter60040px1.15-0.01em--text-heading
subheadingInter50024px1.3—--text-subheading
body-lgInter40016px1.6—--text-body-lg
bodyInter40014px1.6—--text-body
labelInter50012px1.40.14em--text-label

Spacing & Layout

Base unit: 8px Density: comfortable

Spacing Scale
NameValueToken
88px--spacing-8
1616px--spacing-16
2424px--spacing-24
3232px--spacing-32
4848px--spacing-48
6464px--spacing-64
9696px--spacing-96
128128px--spacing-128
Border Radius
ElementValue
cards24px
panels32px
buttons16px
inputs14px
pills999px
  • Page max-width: 1280px
  • Section gap: 128px
  • Card padding: 32px
  • Element gap: 16px

Components

Glass Panel

Role: Every content container: cards, panels, overlays

8% white fill, 40px backdrop-blur, 180% saturation, 1px white-at-15% border, 24px radius. The shadow is always three layers at once: an outer 0 16px 40px dark spread, a 1px white inset highlight on the top edge, and a 1px dark inset edge along the bottom. Padding 32px. On hover the fill rises to 14%, the border to 30%, the outer shadow to the 64px step and the panel lifts 2px, over 500ms with cubic-bezier(0.16, 1, 0.3, 1).

  • Sizes: padding 32px; radius 24px
  • States: hover: fill 8% to 14%, border 15% to 30%, translateY -2px
Champagne CTA

Role: Primary action; one per page

Champagne fill, deep-night text, fully rounded at 999px, no border. 16px type at weight 500, padding 14px 28px. On hover the fill goes to 92% opacity, the button lifts 1px and gains a 0 12px 32px glow at 25% champagne, over the same 500ms easing.

  • Sizes: padding 14px 28px; radius 999px
  • States: hover: lift 1px, glow; focus-visible: 2px champagne outline, 2px offset
Glass Input

Role: Form input and search field

Transparent fill, 1px white-at-15% border, 14px radius, no outer shadow. Padding 12px 16px, 14px type, placeholder in moon steel. Focus raises the border to 40% and adds a 3px outer ring at 8% white without changing the box size.

  • States: focus: border 40%, 3px outer ring
Stat Tile

Role: Key figures and dashboard metrics

A lighter glass panel: 5% white fill, 24px blur, 16px radius, 24px padding. A 12px uppercase 0.14em label in moon steel sits above a 40px figure at weight 600 in white, with 8px of air below for the trend note. The figure takes champagne only if it is the single emphasis on the page.

Night Nav

Role: Top navigation

72px tall, 4% white fill, 20px blur, border only along the bottom at 10% white. Wordmark at 16px weight 500 on the left, 14px moon-steel links in the middle that shift to moonlight on hover, one champagne CTA on the right. Past the first viewport the fill rises to 8%.

Do's and Don'ts

Do
  • Light the background first: deep night ground plus two or three large-radius light wells
  • Glass panels use 5% to 12% white and never exceed 15%
  • Blur starts at 40px and always pairs with 180% saturation
  • Shadows carry three layers: outer spread, white top inset highlight, dark bottom inset edge
  • Champagne is the only accent, reserved for the CTA and key figures
  • Radius starts at 16px; panels take 24px to 32px
  • Transitions run 500ms on cubic-bezier(0.16, 1, 0.3, 1)
Don't
  • No purple-pink AI gradients such as #667eea, #764ba2 or #f093fb
  • Do not place glass on a flat solid background; there is nothing to blur
  • Never tint the glass itself — color belongs to the background
  • No backdrop-blur-sm or any blur below 40px
  • Do not omit backdrop-saturate
  • No opaque fills such as bg-white or bg-black
  • No square corners and no radius under 16px
  • No single-layer flat shadow
  • No 100ms to 150ms transitions; glass moves slowly

Surfaces

LevelNameValuePurpose
0Night#0b1322页面底,所有光斑画在它上面
1Glassrgba(255,255,255,0.08)标准玻璃面板
2Glass Raisedrgba(255,255,255,0.14)hover 态与需要更靠前的浮层

Elevation

  • Glass rest: 0 16px 40px rgba(3,7,18,0.5), inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(2,6,16,0.35)
  • Glass hover: 0 24px 64px rgba(3,7,18,0.6), inset 0 1px 0 rgba(255,255,255,0.32), inset 0 -1px 0 rgba(2,6,16,0.35)

Imagery

There must be a light source. Use night photography, dark product shots, or two to three large-radius radial gradients drawn in CSS. Images stay low-saturation and dark with obvious highlight areas, because glass needs those highlights to read as refraction. No illustration, no icon walls, no flat solid backgrounds.

Layout

Twelve columns capped at 1280px. Section rhythm 128px, panel padding 32px, 16px between elements. Content floats above the light wells, which stay pinned to the background layer and move with slight parallax. No more than three glass panels per viewport; past that there is no solid reference left and the material stops reading as glass.

Agent Prompt Guide

Implementation Contract
  • Use the requested page, user task and real content as the brief. Implement only the requested scope; identify missing business information instead of inventing data or capabilities.
  • Inspect the current project, stack and components first. Reuse its structure, routes, dependencies and components; do not rebuild unrelated pages or features.
  • Use the project's breakpoints to adapt columns and spacing for narrow and desktop screens. Preserve hierarchy and prevent accidental horizontal overflow.
  • For interactions in scope, support keyboard focus and reduced motion, with applicable disabled, loading, empty and error states.
  • Run the project's existing checks after implementation. Report only tests and visual checks actually run, and list unverified behavior.

QUICK COLOR REFERENCE:

  • text: #ffffff
  • background: #0b1322
  • muted: #7c9cc4
  • accent: #e4b863
  • glassFill: rgba(255,255,255,0.08)
  • glassBorder: rgba(255,255,255,0.15)

EXAMPLE COMPONENT PROMPTS:

  1. Build a glass panel: background rgba(255,255,255,0.08), backdrop-filter blur(40px) saturate(180%), 1px border rgba(255,255,255,0.15), 24px radius, 32px padding. The shadow is box-shadow: 0 16px 40px rgba(3,7,18,0.5), inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(2,6,16,0.35). The page ground is #0b1322 with two large radial light wells behind the panel (one #33517a, one #e4b863 at 0.25 opacity).
  2. Build a night hero: left column starts with a 12px uppercase 0.14em label in #7c9cc4, then a 64px weight-600 headline in #ffffff at -0.02em tracking, then 16px body copy in #7c9cc4 at 1.6 line height, and a champagne pill button (#e4b863 fill, #060a13 text, 14px 28px padding) underneath. The right column holds a glass card whose 500ms hover raises the fill to 14% and lifts it 2px.

Similar Brands

  • Apple — Same optical principle: glass takes the background's color, stays neutral itself, and reads its thickness from a top-edge highlight
  • Linear — Dark ground with a single accent, dividing space through panel levels rather than borders
  • Vercel — Night-toned ground and restrained light; hierarchy from luminance rather than ornament

Quick Start


:root {
  /* Colors */
  --color-night-deep: #060a13;
  --color-night: #0b1322;
  --color-night-steel: #16233a;
  --color-moon-steel: #33517a;
  --color-moonlight: #7c9cc4;
  --color-champagne: #e4b863;
  --color-glass-fill: rgba(255,255,255,0.08);

  /* Typography — Font Families */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Typography — Scale */
  --text-display: 64px;
  --leading-display: 1.05;
  --tracking-display: -0.02em;
  --text-heading: 40px;
  --leading-heading: 1.15;
  --tracking-heading: -0.01em;
  --text-subheading: 24px;
  --leading-subheading: 1.3;
  --text-body-lg: 16px;
  --leading-body-lg: 1.6;
  --text-body: 14px;
  --leading-body: 1.6;
  --text-label: 12px;
  --leading-label: 1.4;
  --tracking-label: 0.14em;

  /* Typography — Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;

  /* Spacing */
  --spacing-unit: 8px;
  --spacing-8: 8px;
  --spacing-16: 16px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-48: 48px;
  --spacing-64: 64px;
  --spacing-96: 96px;
  --spacing-128: 128px;

  /* Layout */
  --page-max-width: 1280px;
  --section-gap: 128px;
  --card-padding: 32px;
  --element-gap: 16px;
  --density: comfortable;

  /* Border Radius */
  --radius-cards: 24px;
  --radius-panels: 32px;
  --radius-buttons: 16px;
  --radius-inputs: 14px;
  --radius-pills: 999px;

  /* Surfaces */
  --surface-night: #0b1322;
  --surface-glass: rgba(255,255,255,0.08);
  --surface-glass-raised: rgba(255,255,255,0.14);
}

Community

Ratings & Feedback

No ratings yet - be the firstSign in to rate

Loading comments…

Component Templates

Component Preview

Button

Pointer Interactions

How Glassmorphism moves

Pointer interactions tailored to this style — same cursor, completely different character. Move around the stage to feel it.

Depth · light

Hover · glide

An ambient aura follows the cursor; the glass catches a violet light when you enter.

Static
Ambient aura followParallax depth layersGlass spotlight + zoningExplore all rooms in Cursor Lab

FAQ

Glassmorphism — Frequently Asked Questions

What is the Glassmorphism design style?
Premium frosted glass with a nocturne temperament. Deep ink scenes and restrained light wells; the glass borrows light instead of carrying color — gaussian blur, saturation boost, lit top edges and film grain make glass that feels believable, not decorative. Its core principle: Glassmorphism is optics, not a color scheme.
How do I apply Glassmorphism correctly?
Key practices: Use a deep ink night base (like #0B1322) with 2-3 soft large-radius light wells (radial gradients). Glass panels use bg-white/5 to bg-white/12 with backdrop-blur-[40px] or backdrop-blur-[60px]. Add saturation boost backdrop-saturate-[180%].
What are common mistakes with Glassmorphism?
Avoid: Do not use purple-pink AI gradients (#667eea, #764ba2, #f093fb style indigo-purple-pink combos). Do not use glass on flat solid backgrounds (needs light wells or imagery to blur). Do not exceed 15% glass opacity (it becomes a solid tinted block, not glass).
How do I prompt AI to generate Glassmorphism UI?
Copy the ready-made AI prompt on this page — it bundles the design tokens and component rules — and paste it into ChatGPT, Claude, Claude Code, or Codex. Effective prompts include the keywords: glassmorphism, frosted glass, backdrop blur, backdrop-filter css.
Global Styles

Global CSS

css
/* Nocturne Glassmorphism Global Styles */

:root {
  --glass-blur: 40px;
  --glass-blur-heavy: 60px;
  --glass-saturate: 180%;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-hover: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-border-hover: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 16px 40px rgba(3, 7, 18, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -1px 0 rgba(2, 6, 16, 0.35);
  --glass-shadow-hover: 0 24px 64px rgba(3, 7, 18, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 -1px 0 rgba(2, 6, 16, 0.35);
  --glass-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --night-deep: #060A13;
  --night: #0B1322;
  --night-steel: #16233A;
  --moon-steel: #33517A;
  --moonlight: #7C9CC4;
  --champagne: #E4B863;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12), transparent 50%);
  border-radius: inherit;
  pointer-events: none;
}

.glass-container {
  position: relative;
  background:
    radial-gradient(640px circle at 85% 12%, rgba(124, 156, 196, 0.22), transparent 60%),
    radial-gradient(560px circle at 8% 85%, rgba(51, 81, 122, 0.3), transparent 60%),
    radial-gradient(420px circle at 30% 40%, rgba(228, 184, 99, 0.08), transparent 55%),
    linear-gradient(165deg, var(--night-deep) 0%, var(--night) 55%, var(--night-steel) 100%);
  min-height: 100vh;
}

/* 2.5% film grain removes the plastic feel */
.glass-grain::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes glassmorphism-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glassmorphism-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.glassmorphism-accent-corner {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%);
}

.glassmorphism-animate-in {
  animation: glassmorphism-fade-in 0.5s ease-out both;
}

Compatible Layout Patterns

Recommended Layouts

The following layout patterns pair well with the Glassmorphism style.

Related Styles

Related Styles

Explore these styles for ready-made tokens and components.

Glassmorphism and Asymmetric Grid sit closest to each other. The table below gives the real differences in color, use case, and tags, so the choice between them is made on facts.

AttributeGlassmorphismAsymmetric Grid
Primary colorrgba(255, 255, 255, 0.08)#0f0f0f
Secondary colorrgba(255, 255, 255, 0.05)#ffffff
Best forglassmorphism / frosted glass / backdrop blurasymmetric grid / broken grid layout / asymmetrical layout
Unique tags—high-contrast
Design Philosophy

Glassmorphism is optics, not a color scheme. Real glass has no color of its own — it borrows, bends and softens the light behind it. Apple's Liquid Glass material follows the same principle: glass takes color from the content layer and stays neutral itself.

Design Recipes

Recommended Combinations with Glassmorphism

These curated recipes combine this style with layouts and animations, optimized for specific use cases.