Category · Interactive Difficulty Level · Advanced Published on · January 21, 2024
Morphing Button System
Advanced button system with liquid morphing animations, loading states, and success/error feedback. Features smooth transitions and micro-interactions.
#buttons #morphing #animations #loading #micro-interactions
Responsive Design
Yes
Dark Mode Support
No
lines
345
Browser Compatibility
No
Live Preview
Interact with the component without leaving the page.
HTML
38
lines
CSS
199
lines
JavaScript
108
lines
<div class="morphing-demo">
<div class="button-container">
<button class="morph-btn" data-state="idle">
<span class="btn-text">Click to Process</span>
<span class="btn-loader">
<svg class="circular" viewBox="25 25 50 50">
<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2"></circle>
</svg>
</span>
<span class="btn-success">✓</span>
<span class="btn-error">✗</span>
</button>
<div class="btn-examples">
<button class="morph-btn secondary" data-state="idle">
<span class="btn-text">Secondary Action</span>
<span class="btn-loader">
<svg class="circular" viewBox="25 25 50 50">
<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2"></circle>
</svg>
</span>
<span class="btn-success">✓</span>
<span class="btn-error">✗</span>
</button>
<button class="morph-btn outline" data-state="idle">
<span class="btn-text">Outline Style</span>
<span class="btn-loader">
<svg class="circular" viewBox="25 25 50 50">
<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2"></circle>
</svg>
</span>
<span class="btn-success">✓</span>
<span class="btn-error">✗</span>
</button>
</div>
</div>
</div>