Share Pop
A copy-paste micro-interactions component in pure HTML, CSS & vanilla JS. Zero dependencies, framework-agnostic, MIT-licensed.
Micro-interactionsHTMLCSSJavaScriptany framework
Copy into your project
HTML
<div class="nuda-share-pop">
<button class="nuda-share-pop__trigger" aria-label="Share" aria-expanded="false">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/>
<line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/>
<line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/>
</svg>
</button>
<div class="nuda-share-pop__icons">
<a class="nuda-share-pop__icon" href="#" style="background:#1da1f2;" aria-label="Twitter">T</a>
<a class="nuda-share-pop__icon" href="#" style="background:#4267b2;" aria-label="Facebook">F</a>
<a class="nuda-share-pop__icon" href="#" style="background:#25d366;" aria-label="WhatsApp">W</a>
</div>
</div>CSS
/* Share Pop
Share button pops out social icons.
Customize: icon colors inline or via variables */
.nuda-share-pop {
position: relative;
display: inline-flex;
align-items: center;
}
.nuda-share-pop__trigger {
background: none;
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 50%;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
color: #ccc;
transition: border-color 0.2s;
}
.nuda-share-pop__trigger:hover {
border-color: rgba(255, 255, 255, 0.3);
}
.nuda-share-pop__trigger svg {
width: 18px;
height: 18px;
}
.nuda-share-pop__icons {
display: flex;
gap: 6px;
margin-left: 4px;
}
.nuda-share-pop__icon {
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
font-weight: 700;
color: #fff;
text-decoration: none;
opacity: 0;
transform: scale(0.3) translateX(-10px);
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
will-change: transform, opacity;
}
.nuda-share-pop--open .nuda-share-pop__icon {
opacity: 1;
transform: scale(1) translateX(0);
}
.nuda-share-pop--open .nuda-share-pop__icon:nth-child(2) { transition-delay: 0.05s; }
.nuda-share-pop--open .nuda-share-pop__icon:nth-child(3) { transition-delay: 0.1s; }
@media (prefers-reduced-motion: reduce) {
.nuda-share-pop__icon { transition: none; }
}JavaScript
/* Share Pop — vanilla JS
Toggles the pop-out social icons. */
(function () {
document.querySelectorAll(".nuda-share-pop__trigger").forEach(function (btn) {
btn.addEventListener("click", function () {
var expanded = btn.getAttribute("aria-expanded") === "true";
btn.setAttribute("aria-expanded", String(!expanded));
btn.parentElement.classList.toggle("nuda-share-pop--open");
});
});
})();How to use Share Pop
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.