Arrow Tooltip
A copy-paste tooltips component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
TooltipsHTMLCSSany framework
With animated arrow
Copy into your project
HTML
<div class="nuda-arrow-tooltip-wrap">
<button class="nuda-arrow-tooltip__trigger" aria-describedby="arrow-tip-1">
Hover me
</button>
<div class="nuda-arrow-tooltip" role="tooltip" id="arrow-tip-1">
With animated arrow
<span class="nuda-arrow-tooltip__arrow"></span>
</div>
</div>CSS
/* Arrow Tooltip
Tooltip with an animated arrow and slide-in effect.
Customize: --tooltip-bg, --tooltip-text */
.nuda-arrow-tooltip-wrap {
position: relative;
display: inline-block;
}
.nuda-arrow-tooltip__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-arrow-tooltip {
--tooltip-bg: #1a1a1a;
--tooltip-text: #ccc;
position: absolute;
bottom: calc(100% + 10px);
left: 50%;
transform: translateX(-50%) translateY(4px);
background: var(--tooltip-bg);
border: 1px solid rgba(255, 255, 255, 0.1);
color: var(--tooltip-text);
font-size: 0.75rem;
padding: 0.4rem 0.75rem;
border-radius: 6px;
white-space: nowrap;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s ease, transform 0.2s ease;
}
.nuda-arrow-tooltip__arrow {
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 5px solid transparent;
border-top-color: var(--tooltip-bg);
}
.nuda-arrow-tooltip-wrap:hover .nuda-arrow-tooltip {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
@media (prefers-reduced-motion: reduce) {
.nuda-arrow-tooltip {
transition: none;
}
}How to use Arrow 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.