Lock Shackle Lift
A copy-paste animated icons component in pure HTML, CSS & vanilla JS. Zero dependencies, framework-agnostic, MIT-licensed.
Animated IconsHTMLJavaScriptCSSany framework
Copy into your project
HTML
<button class="nuda-ai2-lock-shackle" type="button" aria-label="Unlock" aria-pressed="false">
<svg class="nuda-ai2-lock-shackle__svg" viewBox="0 0 24 24" aria-hidden="true">
<path class="nuda-ai2-lock-shackle__shackle" d="M7 11V7a5 5 0 0 1 10 0v4" />
<rect class="nuda-ai2-lock-shackle__body" x="3" y="11" width="18" height="11" rx="2" ry="2" />
<line class="nuda-ai2-lock-shackle__key" x1="12" y1="15.5" x2="12" y2="18" />
</svg>
</button>JavaScript
/* Lock Shackle Lift — vanilla JS
Flips aria-pressed/label; CSS lifts the shackle open. */
(function () {
document.querySelectorAll(".nuda-ai2-lock-shackle").forEach(function (btn) {
btn.addEventListener("click", function () {
var unlocked = btn.getAttribute("aria-pressed") !== "true";
btn.setAttribute("aria-pressed", String(unlocked));
btn.setAttribute("aria-label", unlocked ? "Lock" : "Unlock");
});
});
})();CSS
.nuda-ai2-lock-shackle {
display: inline-flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
background: #09090b;
border: 1px solid rgba(255,255,255,.1);
border-radius: 10px;
color: #fafafa;
cursor: pointer;
transition: border-color .25s,color .25s;
}
.nuda-ai2-lock-shackle:hover,.nuda-ai2-lock-shackle:focus-visible {
border-color: rgba(228,255,84,.4);
outline: none;
}
.nuda-ai2-lock-shackle:focus-visible {
box-shadow: 0 0 0 2px rgba(228,255,84,.5);
}
.nuda-ai2-lock-shackle[aria-pressed="true"] {
color: #e4ff54;
}
.nuda-ai2-lock-shackle__svg {
width: 28px;
height: 28px;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
fill: none;
}
.nuda-ai2-lock-shackle__shackle {
transform-origin: 7px 11px;
transition: transform .35s cubic-bezier(.4,.2,.2,1.2);
}
.nuda-ai2-lock-shackle__key {
transition: opacity .2s,transform .25s;
transform-origin: 12px 15.5px;
}
.nuda-ai2-lock-shackle[aria-pressed="true"] .nuda-ai2-lock-shackle__shackle {
transform: translate(2px,-3px) rotate(25deg);
}
.nuda-ai2-lock-shackle[aria-pressed="true"] .nuda-ai2-lock-shackle__key {
opacity: 0;
transform: scaleY(.4);
}
@media (prefers-reduced-motion:reduce) {
.nuda-ai2-lock-shackle__shackle,.nuda-ai2-lock-shackle__key {
transition: none;
}
}
How to use Lock Shackle Lift
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.