Morphing Liquid Button
A button that behaves like liquid, smoothly changing shape and flowing between states
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/morphing-liquid-button.
<iframe src="/embed/morphing-liquid-button" sandbox="allow-scripts" loading="lazy" title="Morphing Liquid Button" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Morphing Liquid Button, or grab a framework-specific implementation. The HTML and CSS variants are self-contained; framework variants assume that framework's project setup.
HTML
<button class="liquid-morph-button">Liquid</button>CSS
.liquid-morph-button {
padding: 1.25rem 2.5rem;
font-weight: 600;
background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
color: white;
border: none;
cursor: pointer;
animation: liquid-morph 5s ease-in-out infinite;
transition: all 0.3s ease;
}
.liquid-morph-button:hover {
transform: scale(1.06);
box-shadow: 0 20px 50px rgba(168, 85, 247, 0.4);
}
.liquid-morph-button:active {
transform: scale(0.93);
}
@keyframes liquid-morph {
0%, 100% { border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%; }
33% { border-radius: 50% 50% 40% 60% / 40% 60% 50% 50%; }
66% { border-radius: 30% 70% 50% 50% / 50% 40% 60% 60%; }
}Tailwind CSS
<button class="px-10 py-5 font-semibold bg-gradient-to-br from-indigo-500 via-purple-500 to-pink-500 text-white hover:scale-106 hover:shadow-2xl hover:shadow-purple-500/40 active:scale-93 transition-all" style="animation: liquid-morph 5s ease-in-out infinite;">
Liquid
</button>React
function LiquidMorphButton() {
return (
<motion.button
className="px-10 py-5 font-semibold"
style={{ background: 'linear-gradient(135deg, #6366f1, #a855f7, #ec4899)', color: '#fff', border: 'none', cursor: 'pointer' }}
animate={{ borderRadius: ['40% 60% 60% 40% / 60% 30% 70% 40%', '50% 50% 40% 60% / 40% 60% 50% 50%', '30% 70% 50% 50% / 50% 40% 60% 60%', '40% 60% 60% 40% / 60% 30% 70% 40%'] }}
transition={{ borderRadius: { duration: 5, repeat: Infinity, ease: 'easeInOut' } }}
whileHover={{ scale: 1.06, boxShadow: '0 20px 50px rgba(168,85,247,0.4)' }}
whileTap={{ scale: 0.93 }}
>
Liquid
</motion.button>
);
}LWC — HTML template
<template><button class="liquid-morph-button" onclick={handleClick}><slot>Liquid</slot></button></template>LWC — JavaScript
import { LightningElement, api } from 'lwc';
export default class LiquidMorphButton extends LightningElement {
@api label = 'Liquid';
handleClick() { this.dispatchEvent(new CustomEvent('buttonclick', { bubbles: true, composed: true })); }
}LWC — CSS
.liquid-morph-button { padding: 1.25rem 2.5rem; font-weight: 600; background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899); color: white; border: none; cursor: pointer; animation: liquid-morph 5s ease-in-out infinite; transition: all 0.3s ease; }
.liquid-morph-button:hover { transform: scale(1.06); box-shadow: 0 20px 50px rgba(168,85,247,0.4); }
.liquid-morph-button:active { transform: scale(0.93); }
@keyframes liquid-morph { 0%,100% { border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%; } 33% { border-radius: 50% 50% 40% 60% / 40% 60% 50% 50%; } 66% { border-radius: 30% 70% 50% 50% / 50% 40% 60% 60%; } }LWC — Configuration
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<isExposed>true</isExposed>
<targets><target>lightning__AppPage</target><target>lightning__RecordPage</target><target>lightning__HomePage</target></targets>
</LightningComponentBundle>Where Morphing Liquid Button fits
- AI Products
- Creative Portfolios
- Modern Landing Pages
- Interactive UI
Interaction states & animations
- Morph
- Ripple
- Elastic
- Flow
Topics
- #liquid
- #morph
- #blob
- #fluid
- #organic
- #ripple
Accessibility notes
Provide reduced-motion alternative. Ensure button remains clickable during morph animation.
Browser support
- All modern browsers