Glassmorphism
玻璃拟态
stylekitMITGlassmorphism · glassmorphismTexture · textureProfessional · professionalMinimal · minimalLuxury · luxuryLight and dark · bothMedium · mediumNeutral · neutralMuted · mutedSerif · serifGeneral · generalLanding · landing
夜航质感的高级毛玻璃。深墨夜景配克制光源,玻璃只借光、不带色:高斯模糊、饱和度增强、受光顶边与噪点颗粒,营造真实玻璃的安静高级感。
NNorthwind
Product · PricingSpecimen
Make the work feel finished
One interface, dressed in this style. Compare type, color, radius, and density.
128
Active
4.8
Score
12ms
Edge
Attribution
"Glassmorphism" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/glassmorphism @ bfa7da909e86.
https://github.com/AnxForever/stylekit · api/styles/glassmorphism · bfa7da909e86 · © AnxForever
Do
- 背景使用深墨夜景底色(#0B1322 一类)+ 2-3 个大半径柔和光源光斑(radial-gradient light wells)
- 玻璃面板使用 bg-white/5 到 bg-white/12,配 backdrop-blur-[40px] 或 backdrop-blur-[60px]
- 添加饱和度增强 backdrop-saturate-[180%]
- 光有方向:inset 0 1px 0 白色高光(顶边受光)+ inset 0 -1px 0 深色暗缘(底边背光)+ 外层深阴影
- 叠加 2%-3% 噪点纹理(SVG feTurbulence)保留玻璃颗粒感
- 唯一强调色香槟金 #E4B863,只用于主 CTA、关键数字和高亮文字
- 边框使用 border-white/15,hover 时提升到 border-white/30
- 圆角使用 rounded-2xl 或 rounded-3xl
Don't
- 禁止紫粉 AI 渐变背景(#667eea、#764ba2、#f093fb 一类的 indigo-purple-pink 组合)
- 禁止在纯色平面背景上使用(必须有光源或图片,玻璃才有东西可模糊)
- 禁止玻璃透明度超过 15%(会变成实心色块,失去玻璃感)
- 禁止使用低模糊值 backdrop-blur-sm 或 backdrop-blur
- 禁止省略 backdrop-saturate(饱和度增强让暗景光源透过玻璃发亮)
- 禁止给玻璃面板本身上色(玻璃无色,颜色属于背景)
- 禁止使用不透明背景 bg-white, bg-black
- 禁止使用快速过渡 duration-100, duration-150
Prompt
Create a nocturne glassmorphism dashboard with: 1. Background: deep ink #0B1322 with three soft radial light wells — rgba(124,156,196,0.28) top right, rgba(51,81,122,0.35) bottom left, rgba(228,184,99,0.12) center accent 2. Film grain: full-viewport 2.5% SVG feTurbulence noise overlay 3. Top nav: fixed, bg-white/6 backdrop-blur-[60px] backdrop-saturate-[180%], border-b border-white/10 4. Stat cards: bg-white/8 backdrop-blur-[60px], directional shadows (outer depth + inset top highlight + inset bottom shade), key numbers in champagne #E4B863, hover lift 5. Chart area: large colorless glass panel; chart line in moonlight #7C9CC4 with champagne highlight point 6. All transitions: duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] 7. Specular sweep on card hover; NO purple-pink gradients anywhere --- "Glassmorphism" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/glassmorphism @ bfa7da909e86. powered by Styledex — https://styledex.dev
Tokens
DTCG
{
"$schema": "https://www.designtokens.org/schemas/2025.10/format.json",
"$description": "Glassmorphism. \"Glassmorphism\" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/glassmorphism @ bfa7da909e86.",
"$extensions": {
"dev.styledex": {
"id": "stylekit-glassmorphism",
"license": "MIT",
"attribution": "\"Glassmorphism\" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/glassmorphism @ bfa7da909e86.",
"banner": "powered by Styledex — https://styledex.dev"
}
},
"color": {
"background": {
"$type": "color",
"$value": "#f7f5f2"
},
"foreground": {
"$type": "color",
"$value": "#ffffff"
},
"card": {
"$type": "color",
"$value": "#f7f5f2"
},
"card-foreground": {
"$type": "color",
"$value": "#ffffff"
},
"primary": {
"$type": "color",
"$value": "rgba(255, 255, 255, 0.08)"
},
"primary-foreground": {
"$type": "color",
"$value": "#1c1917"
},
"secondary": {
"$type": "color",
"$value": "rgba(255, 255, 255, 0.05)"
},
"secondary-foreground": {
"$type": "color",
"$value": "#ffffff"
},
"accent": {
"$type": "color",
"$value": "#0b1322"
},
"accent-foreground": {
"$type": "color",
"$value": "#fafaf9"
},
"muted": {
"$type": "color",
"$value": "#f7f6f3"
},
"muted-foreground": {
"$type": "color",
"$value": "#ffffff"
},
"border": {
"$type": "color",
"$value": "#f8f6f4"
},
"destructive": {
"$type": "color",
"$value": "#dc2626"
},
"ring": {
"$type": "color",
"$value": "rgba(255, 255, 255, 0.08)"
}
},
"font": {
"sans": {
"$type": "fontFamily",
"$value": [
"ui-sans-serif",
"system-ui",
"sans-serif"
]
},
"serif": {
"$type": "fontFamily",
"$value": [
"ui-serif",
"Georgia",
"serif"
]
},
"mono": {
"$type": "fontFamily",
"$value": [
"ui-monospace",
"SFMono-Regular",
"Menlo",
"monospace"
]
}
},
"radius": {
"base": {
"$type": "dimension",
"$value": "0.5rem"
}
},
"spacing": {
"base": {
"$type": "dimension",
"$value": "1rem"
}
},
"shadow": {
"base": {
"$type": "shadow",
"$value": "0 8px 24px rgba(3,7,18,0.45),inset 0 1px 0 rgba(255,255,255,0.22),inset 0 -1px 0 rgba(2,6,16,0.3)"
}
}
}
CSS
/* powered by Styledex — https://styledex.dev */
/* "Glassmorphism" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/glassmorphism @ bfa7da909e86. */
:root {
--background: #f7f5f2;
--foreground: #ffffff;
--card: #f7f5f2;
--card-foreground: #ffffff;
--primary: rgba(255, 255, 255, 0.08);
--primary-foreground: #1c1917;
--secondary: rgba(255, 255, 255, 0.05);
--secondary-foreground: #ffffff;
--accent: #0b1322;
--accent-foreground: #fafaf9;
--muted: #f7f6f3;
--muted-foreground: #ffffff;
--border: #f8f6f4;
--destructive: #dc2626;
--ring: rgba(255, 255, 255, 0.08);
--radius: 0.5rem;
--font-sans: ui-sans-serif, system-ui, sans-serif;
--font-serif: ui-serif, Georgia, serif;
--font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
--spacing: 1rem;
--shadow: 0 8px 24px rgba(3,7,18,0.45),inset 0 1px 0 rgba(255,255,255,0.22),inset 0 -1px 0 rgba(2,6,16,0.3);
}
Tailwind
/* powered by Styledex — https://styledex.dev */
/* "Glassmorphism" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/glassmorphism @ bfa7da909e86. */
/** Tailwind theme extend for Glassmorphism (stylekit-glassmorphism) */
module.exports = {
"theme": {
"extend": {
"colors": {
"background": "#f7f5f2",
"foreground": "#ffffff",
"card": "#f7f5f2",
"primary": "rgba(255, 255, 255, 0.08)",
"primary-foreground": "#1c1917",
"secondary": "rgba(255, 255, 255, 0.05)",
"accent": "#0b1322",
"muted": "#f7f6f3",
"border": "#f8f6f4",
"destructive": "#dc2626",
"ring": "rgba(255, 255, 255, 0.08)"
},
"borderRadius": {
"lg": "0.5rem"
},
"fontFamily": {
"sans": [
"ui-sans-serif",
"system-ui",
"sans-serif"
],
"serif": [
"ui-serif",
"Georgia",
"serif"
],
"mono": [
"ui-monospace",
"SFMono-Regular",
"Menlo",
"monospace"
]
},
"boxShadow": {
"styledex": "0 8px 24px rgba(3,7,18,0.45),inset 0 1px 0 rgba(255,255,255,0.22),inset 0 -1px 0 rgba(2,6,16,0.3)"
}
}
}
};
shadcn
/* powered by Styledex — https://styledex.dev */
/* "Glassmorphism" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/glassmorphism @ bfa7da909e86. */
@layer base {
:root {
--background: #f7f5f2;
--foreground: #ffffff;
--card: #f7f5f2;
--card-foreground: #ffffff;
--primary: rgba(255, 255, 255, 0.08);
--primary-foreground: #1c1917;
--secondary: rgba(255, 255, 255, 0.05);
--secondary-foreground: #ffffff;
--accent: #0b1322;
--accent-foreground: #fafaf9;
--muted: #f7f6f3;
--muted-foreground: #ffffff;
--border: #f8f6f4;
--destructive: #dc2626;
--ring: rgba(255, 255, 255, 0.08);
--radius: 0.5rem;
--font-sans: ui-sans-serif, system-ui, sans-serif;
--font-serif: ui-serif, Georgia, serif;
--font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
--spacing: 1rem;
--shadow: 0 8px 24px rgba(3,7,18,0.45),inset 0 1px 0 rgba(255,255,255,0.22),inset 0 -1px 0 rgba(2,6,16,0.3);
}
}