Build dark-mode glassmorphism interfaces with readable contrast, frosted surfaces, and gradient borders using a pseudo-element mask. Use when asked for glass ca
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-glass-dark-ui-ec1102ac2cd1 ,按照其中的说明把「glass-dark-ui」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
HTML/CSS, Tailwind, or React) and target surface (hero, dashboard, modal, card).backdrop-filter, transparent dark fill, and subtle inner highlight..border-gradient::before) to key surfaces.Use these as defaults and tune per brand.
:root {
--bg-0: #020617;
--bg-1: #0b1220;
--glass-fill: rgba(15, 23, 42, 0.45);
--glass-fill-strong: rgba(15, 23, 42, 0.62);
--text-main: #e2e8f0;
--text-muted: #94a3b8;
--accent: #60a5fa;
}
.glass-panel {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
background-color: var(--glass-fill);
border-radius: 24px;
box-shadow: 0 20px 48px rgba(2, 6, 23, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
backdrop-filter: blur(18px) saturate(140%);
-webkit-backdrop-filter: blur(18px) saturate(140%);
}
.border-gradient {
position: relative;
}
.border-gradient::before {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
padding: 1px;
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
background: linear-gradient(
145deg,
rgba(148, 163, 184, 0.28) 0%,
rgba(96, 165, 250, 0.36) 45%,
rgba(168, 85, 247, 0.3) 70%,
rgba(148, 163, 184, 0.18) 100%
);
pointer-events: none;
}
<section class="relative rounded-3xl border-gradient bg-slate-950/45 backdrop-blur-xl p-8 shadow-[0_20px_48px_rgba(2,6,23,0.45),inset_0_1px_0_rgba(255,255,255,0.12)]">
<h2 class="text-slate-100 text-2xl font-semibold">Frosted Panel</h2>
<p class="text-slate-400 mt-2">Dark glass card with masked gradient border.</p>
</section>
#cbd5e1 on dark glass surfaces.outline or bright border state).--glass-fill-strong).