Glass Tooltip
A copy-paste tooltips component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
TooltipsHTMLCSSany framework
Frosted glass
Copy into your project
HTML
<div class="nuda-glasstip-wrap">
<button class="nuda-glasstip__trigger" aria-describedby="glasstip-tip-1">
Hover me
</button>
<div class="nuda-glasstip" role="tooltip" id="glasstip-tip-1">
Frosted glass
</div>
</div>CSS
/* Glass Tooltip
Frosted glassmorphism tooltip that fades + scales up.
Shows on hover and keyboard focus.
Customize: --glasstip-bg, blur radius */
.nuda-glasstip-wrap {
position: relative;
display: inline-block;
}
.nuda-glasstip__trigger {
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.12);
color: #ccc;
padding: 0.45rem 1rem;
border-radius: 8px;
font-size: 0.85rem;
cursor: pointer;
}
.nuda-glasstip {
--glasstip-bg: rgba(20, 20, 24, 0.55);
position: absolute;
bottom: calc(100% + 9px);
left: 50%;
transform: translateX(-50%) translateY(6px) scale(0.96);
background: var(--glasstip-bg);
border: 1px solid rgba(255, 255, 255, 0.16);
color: #fafafa;
font-size: 0.75rem;
padding: 0.4rem 0.8rem;
border-radius: 9px;
white-space: nowrap;
opacity: 0;
pointer-events: none;
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
box-shadow:
0 8px 24px -8px rgba(0, 0, 0, 0.5),
inset 0 1px 0 rgba(255, 255, 255, 0.12);
transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nuda-glasstip-wrap:hover .nuda-glasstip,
.nuda-glasstip__trigger:focus-visible + .nuda-glasstip {
opacity: 1;
transform: translateX(-50%) translateY(0) scale(1);
}
@media (prefers-reduced-motion: reduce) {
.nuda-glasstip { transition: none; }
}How to use Glass Tooltip
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.