Squircle Breathe
A copy-paste morphing shapes component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Morphing ShapesHTMLCSSany framework
Copy into your project
HTML
<!-- Squircle Breathe -->
<div class="nuda-ms2-squircle-breathe" role="img" aria-label="Rounded square breathing in and out">
<span class="nuda-ms2-squircle-breathe__shape" aria-hidden="true"></span>
</div>CSS
.nuda-ms2-squircle-breathe {
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.nuda-ms2-squircle-breathe__shape {
width: 72px;
height: 72px;
background: linear-gradient(135deg,#e4ff54,#a3b830);
border-radius: 28%;
animation: _nuda-ms2SquircleBreathe 3.2s ease-in-out infinite;
will-change: transform,border-radius;
}
@keyframes _nuda-ms2SquircleBreathe {
0%,100% {
border-radius: 28%;
transform: scale(1);
}
50% {
border-radius: 38%;
transform: scale(1.05);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-ms2-squircle-breathe__shape {
animation: none;
border-radius: 28%;
transform: scale(1);
}
}
How to use Squircle Breathe
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.