Best For
glassmorphism / frosted glass / backdrop blur
玻璃拟态
Rate this stylePremium 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.
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)
Showcase Entry
Live preview of the showcase page. Click to explore the full experience.
Color Palette
design.md
One document describes the colour roles, type rules, spacing and component construction behind this style. Copy or download it into Claude Code or Codex.
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.
| Name | Value | Token | Role |
|---|---|---|---|
| Night Deep | #060a13 | --color-night-deep | The deepest layer: full-screen backdrops and base sections. Glass only reads when it floats above this. |
| Night | #0b1322 | --color-night | The default page ground, one step lighter than the deepest tone so adjacent sections separate without a second color band. |
| Night Steel | #16233a | --color-night-steel | Secondary panels and input beds, for the places that need one more level beneath the glass. |
| Moon Steel | #33517a | --color-moon-steel | Secondary text, chart contrast and dividers. The closest thing the night palette has to a structural line. |
| Moonlight | #7c9cc4 | --color-moonlight | Highlighted text, icons and data points — bright enough to register without competing with the CTA. |
| Champagne | #e4b863 | --color-champagne | The only accent in the system. Reserved for the primary CTA, key figures and the single most important link. |
| Glass Fill | rgba(255,255,255,0.08) | --color-glass-fill | Panel fill. Always translucent and never above 15%, or it degrades into a solid block. |
| Role | Family | Weight | Size | Line Height | Letter Spacing | Token |
|---|---|---|---|---|---|---|
| display | Inter | 600 | 64px | 1.05 | -0.02em | --text-display |
| heading | Inter | 600 | 40px | 1.15 | -0.01em | --text-heading |
| subheading | Inter | 500 | 24px | 1.3 | — | --text-subheading |
| body-lg | Inter | 400 | 16px | 1.6 | — | --text-body-lg |
| body | Inter | 400 | 14px | 1.6 | — | --text-body |
| label | Inter | 500 | 12px | 1.4 | 0.14em | --text-label |
Base unit: 8px Density: comfortable
| Name | Value | Token |
|---|---|---|
| 8 | 8px | --spacing-8 |
| 16 | 16px | --spacing-16 |
| 24 | 24px | --spacing-24 |
| 32 | 32px | --spacing-32 |
| 48 | 48px | --spacing-48 |
| 64 | 64px | --spacing-64 |
| 96 | 96px | --spacing-96 |
| 128 | 128px | --spacing-128 |
| Element | Value |
|---|---|
| cards | 24px |
| panels | 32px |
| buttons | 16px |
| inputs | 14px |
| pills | 999px |
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).
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.
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.
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.
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%.
| Level | Name | Value | Purpose |
|---|---|---|---|
| 0 | Night | #0b1322 | 页面底,所有光斑画在它上面 |
| 1 | Glass | rgba(255,255,255,0.08) | 标准玻璃面板 |
| 2 | Glass Raised | rgba(255,255,255,0.14) | hover 态与需要更靠前的浮层 |
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)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)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.
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.
QUICK COLOR REFERENCE:
#ffffff#0b1322#7c9cc4#e4b863rgba(255,255,255,0.08)rgba(255,255,255,0.15)EXAMPLE COMPONENT PROMPTS:
: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);
}
Component Templates
Pointer Interactions
Pointer interactions tailored to this style — same cursor, completely different character. Move around the stage to feel it.
Depth · light
An ambient aura follows the cursor; the glass catches a violet light when you enter.
FAQ
/* 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
The following layout patterns pair well with the Glassmorphism style.
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.
| Attribute | Glassmorphism | Asymmetric Grid |
|---|---|---|
| Primary color | rgba(255, 255, 255, 0.08) | #0f0f0f |
| Secondary color | rgba(255, 255, 255, 0.05) | #ffffff |
| Best for | glassmorphism / frosted glass / backdrop blur | asymmetric grid / broken grid layout / asymmetrical layout |
| Unique tags | — | high-contrast |
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
These curated recipes combine this style with layouts and animations, optimized for specific use cases.