Share Button
A copy-paste comments & reactions component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Comments & ReactionsHTMLCSSany framework
Copy into your project
HTML
<button type="button" class="nuda-share-btn" aria-label="Share">
<span class="nuda-share-btn__tooltip" aria-hidden="true">Copy link</span>
<svg class="nuda-share-btn__icon" viewBox="0 0 24 24" aria-hidden="true">
<circle cx="18" cy="5" r="3" fill="none" stroke="currentColor" stroke-width="2" />
<circle cx="6" cy="12" r="3" fill="none" stroke="currentColor" stroke-width="2" />
<circle cx="18" cy="19" r="3" fill="none" stroke="currentColor" stroke-width="2" />
<path d="M8.6 10.5l6.8-3.9M8.6 13.5l6.8 3.9"
stroke="currentColor" stroke-width="2" stroke-linecap="round" />
</svg>
<span>Share</span>
</button>CSS
/* Share Button
Icon rotates + a tooltip slides in on hover. */
.nuda-share-btn {
position: relative;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 7px 14px 7px 12px;
background: #0c0c10;
border: 1px solid #1c1c22;
border-radius: 999px;
color: #a0a0a8;
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: color 0.25s, border-color 0.25s;
}
.nuda-share-btn__icon {
width: 16px;
height: 16px;
color: #a0a0a8;
transition: color 0.25s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nuda-share-btn:hover { color: #fafafa; border-color: #9d6dff; }
.nuda-share-btn:hover .nuda-share-btn__icon {
color: #9d6dff;
transform: rotate(-12deg) scale(1.1);
}
.nuda-share-btn__tooltip {
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
transform: translateX(-50%) translateY(4px);
background: #111114;
border: 1px solid #1c1c22;
color: #fafafa;
font-size: 11px;
padding: 4px 8px;
border-radius: 6px;
white-space: nowrap;
opacity: 0;
pointer-events: none;
transition: opacity 0.25s, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.nuda-share-btn__tooltip::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 4px solid transparent;
border-top-color: #1c1c22;
}
.nuda-share-btn:hover .nuda-share-btn__tooltip {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
.nuda-share-btn:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
.nuda-share-btn,
.nuda-share-btn__icon,
.nuda-share-btn__tooltip { transition: none; }
.nuda-share-btn:hover .nuda-share-btn__icon { transform: none; }
}How to use Share Button
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.