Volcano Forge
Compile button with lava rising, metal melting, sparks flying, and finished product cooling animation
Volcano Forge
by FreeCsStyles Dev's
AnimatedStorybook
🌐HTML/CSS🎨Tailwind⚛️React💚Vue🅰️Angular🔥Svelte☁️LWC
#volcano#lava#forge#fire#compile#sparks
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/volcano-forge.
<iframe src="/embed/volcano-forge" sandbox="allow-scripts" loading="lazy" title="Volcano Forge" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Volcano Forge, 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="btn-volcano-forge"><span class="icon">🌋</span><span class="text">Compile</span><div class="sparks"></div></button>CSS
.btn-volcano-forge{width:180px;height:60px;border-radius:12px;border:none;background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;font-size:16px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;gap:8px;overflow:hidden;transition:all .4s;font-family:system-ui,sans-serif;z-index:1}.btn-volcano-forge::before{content:'';position:absolute;bottom:0;left:0;right:0;height:0;background:linear-gradient(0deg,#f97316,#ef4444);transition:height 1s ease;z-index:-1}.btn-volcano-forge .icon,.btn-volcano-forge .text{position:relative;z-index:2;transition:all .3s}.btn-volcano-forge .sparks{position:absolute;inset:0;pointer-events:none;z-index:3}.btn-volcano-forge .sparks::before,.btn-volcano-forge .sparks::after{content:'🔥';position:absolute;font-size:10px;opacity:0}.btn-volcano-forge .sparks::before{top:50%;left:30%;animation:spark1 0.8s ease-out infinite}.btn-volcano-forge .sparks::after{top:40%;right:20%;animation:spark2 1s ease-out infinite .2s}.btn-volcano-forge.is-forge::before{height:100%}.btn-volcano-forge.is-forge .icon{animation:fire-shake .3s ease-in-out infinite}.btn-volcano-forge.is-forge .sparks::before,.btn-volcano-forge.is-forge .sparks::after{opacity:1}.btn-volcano-forge.is-forged{background:linear-gradient(135deg,#f97316,#dc2626);box-shadow:0 0 40px rgba(249,115,22,.6),0 0 80px rgba(220,38,38,.4)}.btn-volcano-forge.is-cooling{background:linear-gradient(135deg,#71717a,#52525b);box-shadow:0 0 20px rgba(113,113,122,.5);transition:background 1s,box-shadow 1s}.btn-volcano-forge.is-cooling .text{color:#d4d4d8}@keyframes spark1{0%{opacity:1;transform:translate(0,0) scale(1)}50%{opacity:1}100%{opacity:0;transform:translate(-20px,-30px) scale(0)}}@keyframes spark2{0%{opacity:1;transform:translate(0,0) scale(1)}50%{opacity:1}100%{opacity:0;transform:translate(15px,-25px) scale(0)}}@keyframes fire-shake{0%,100%{transform:rotate(0deg)}25%{transform:rotate(-3deg)}75%{transform:rotate(3deg)}}Tailwind CSS
<button class="relative w-[180px] h-[60px] rounded-xl bg-gradient-to-br from-red-600 to-red-800 text-white font-bold text-base flex items-center justify-center gap-2 overflow-hidden transition-all duration-300 hover:shadow-lg hover:shadow-red-500/50"><span class="relative z-10">🌋 Compile</span></button>React
import { useState } from 'react';
export function VolcanoForgeButton() {
const [phase, setPhase] = useState('idle');
const handleClick = () => {
if (phase !== 'idle') return;
setPhase('forge');
setTimeout(() => setPhase('forged'), 1500);
setTimeout(() => setPhase('cooling'), 2500);
setTimeout(() => setPhase('idle'), 4500);
};
const bgClass = phase === 'cooling'
? 'linear-gradient(135deg, #71717a, #52525b)'
: phase === 'forged'
? 'linear-gradient(135deg, #f97316, #dc2626)'
: 'linear-gradient(135deg, #dc2626, #991b1b)';
return (
<button onClick={handleClick} disabled={phase !== 'idle'}
style={{
width: 180, height: 60, borderRadius: 12, border: 'none',
background: bgClass, color: phase === 'cooling' ? '#d4d4d8' : '#fff',
fontSize: 16, fontWeight: 'bold', cursor: 'pointer', position: 'relative',
display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 8,
overflow: 'hidden', fontFamily: 'system-ui,sans-serif',
boxShadow: phase === 'forged' ? '0 0 40px rgba(249,115,22,0.6), 0 0 80px rgba(220,38,38,0.4)' : 'none',
transition: 'all 0.4s'
}}>
<span style={{ position: 'relative', zIndex: 10 }}>
{phase === 'idle' ? '🌋 Compile' : phase === 'forged' ? '✅ Forged' : phase === 'cooling' ? '🧊 Cooled' : '🔥'}
</span>
</button>
);
}Vue
<template>
<button class="btn-volcano-forge" :class="phaseClass" @click="handleClick" :disabled="phase !== 'idle'">
<span class="icon">{{ phase === 'idle' ? '🌋' : phase === 'forged' ? '✅' : phase === 'cooling' ? '🧊' : '🔥' }}</span>
<span class="text">{{ phase === 'idle' ? 'Compile' : phase === 'forged' ? 'Forged' : phase === 'cooling' ? 'Cooled' : '' }}</span>
</button>
</template>
<script setup>
import { ref, computed } from 'vue';
const phase = ref('idle');
const phaseClass = computed(() => `is-${phase.value}`);
function handleClick() {
if (phase.value !== 'idle') return;
phase.value = 'forge';
setTimeout(() => phase.value = 'forged', 1500);
setTimeout(() => phase.value = 'cooling', 2500);
setTimeout(() => phase.value = 'idle', 4500);
}
</script>Svelte
<script>
let phase = 'idle';
function handleClick() {
if (phase !== 'idle') return;
phase = 'forge';
setTimeout(() => phase = 'forged', 1500);
setTimeout(() => phase = 'cooling', 2500);
setTimeout(() => phase = 'idle', 4500);
}
</script>
<button class="btn-volcano-forge" class:is-forged={phase==='forged'} class:is-cooling={phase==='cooling'} on:click={handleClick} disabled={phase !== 'idle'}>
<span>{phase === 'idle' ? '🌋 Compile' : phase === 'forged' ? '✅ Forged' : phase === 'cooling' ? '🧊 Cooled' : '🔥'}</span>
</button>Angular
import { Component } from '@angular/core';
@Component({
selector: 'app-volcano-forge-button',
template: `<button class="btn-volcano-forge" [class.is-forge]="phase==='forge'" [class.is-forged]="phase==='forged'" [class.is-cooling]="phase==='cooling'" (click)="handleClick()" [disabled]="phase!=='idle'"><span>{{ phase==='idle' ? '🌋 Compile' : phase==='forged' ? '✅ Forged' : phase==='cooling' ? '🧊 Cooled' : '🔥' }}</span></button>`,
styles: [`.btn-volcano-forge{width:180px;height:60px;border-radius:12px;border:none;background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;font-size:16px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;overflow:hidden;transition:all .4s}.btn-volcano-forge.is-forged{box-shadow:0 0 40px rgba(249,115,22,.6),0 0 80px rgba(220,38,38,.4)}.btn-volcano-forge.is-cooling{background:linear-gradient(135deg,#71717a,#52525b);color:#d4d4d8}`]
})
export class VolcanoForgeButtonComponent {
phase = 'idle';
handleClick() {
if (this.phase !== 'idle') return;
this.phase = 'forge';
setTimeout(() => this.phase = 'forged', 1500);
setTimeout(() => this.phase = 'cooling', 2500);
setTimeout(() => this.phase = 'idle', 4500);
}
}LWC — HTML template
<template><button class="btn-volcano-forge" onclick={handleClick} disabled={disabled}><span>{label}</span></button></template>LWC — JavaScript
import { LightningElement } from 'lwc';
export default class VolcanoForgeButton extends LightningElement {
phase = 'idle';
get disabled() { return this.phase !== 'idle'; }
get label() { return this.phase === 'idle' ? '🌋 Compile' : this.phase === 'forged' ? '✅ Forged' : this.phase === 'cooling' ? '🧊 Cooled' : '🔥'; }
handleClick() {
if (this.phase !== 'idle') return;
this.phase = 'forge';
setTimeout(() => { this.phase = 'forged'; }, 1500);
setTimeout(() => { this.phase = 'cooling'; }, 2500);
setTimeout(() => { this.phase = 'idle'; }, 4500);
}
}LWC — CSS
.btn-volcano-forge{width:180px;height:60px;border-radius:12px;border:none;background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;font-size:16px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;overflow:hidden;transition:all .4s}.btn-volcano-forge.is-forged{box-shadow:0 0 40px rgba(249,115,22,.6),0 0 80px rgba(220,38,38,.4)}.btn-volcano-forge.is-cooling{background:linear-gradient(135deg,#71717a,#52525b);color:#d4d4d8}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 Volcano Forge fits
- Build Actions
- Compile Code
- Process Data
- Forge Creation
Interaction states & animations
- Lava Rise
- Metal Melt
- Sparks
- Cool Down
Topics
- #volcano
- #lava
- #forge
- #fire
- #compile
- #sparks
Accessibility notes
Animation is decorative. Button text remains readable. Respect reduced-motion preference.
Browser support
- All modern browsers