Domino Effect
The first domino falls triggering an entire chain reaction until the final tile reveals Done
Domino Effect
by FreeCsStyles Dev's
AnimatedStorybook
🌐HTML/CSS🎨Tailwind⚛️React💚Vue🅰️Angular🔥Svelte☁️LWC
#domino#chain#reaction#workflow#cascade#execute
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/domino-effect.
<iframe src="/embed/domino-effect" sandbox="allow-scripts" loading="lazy" title="Domino Effect" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Domino Effect, 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-domino"><span class="text">Execute Workflow</span></button>CSS
.btn-domino{width:170px;height:50px;border-radius:12px;border:none;background:#475569;color:#fff;font-size:14px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;transition:all .4s;font-family:system-ui,sans-serif}.btn-domino .domino{position:absolute;font-size:10px;transform-origin:bottom center;opacity:0;transition:all .3s}.btn-domino .text{z-index:1;transition:.3s}.btn-domino.is-falling .text{opacity:0}.btn-domino.is-falling .domino{opacity:1}.btn-domino.is-falling .d1{animation:domino-fall .2s forwards ease-out}.btn-domino.is-falling .d2{animation:domino-fall .2s .15s forwards ease-out}.btn-domino.is-falling .d3{animation:domino-fall .2s .3s forwards ease-out}.btn-domino.is-falling .d4{animation:domino-fall .2s .45s forwards ease-out}.btn-domino.is-done{background:#15803d;border:1px solid #86efac}@keyframes domino-fall{0%{transform:rotate(0deg);opacity:1}100%{transform:rotate(90deg);opacity:1}}Tailwind CSS
<button class="w-[170px] h-[50px] rounded-xl border-none bg-slate-600 text-white font-bold cursor-pointer relative flex items-center justify-center overflow-hidden transition-all duration-[400ms] font-sans"><span class="relative z-10">🀰 Execute Workflow</span></button>React
import { useState } from 'react';
export function DominoEffect() {
const [phase, setPhase] = useState('idle');
const handleClick = () => {
if (phase !== 'idle') return;
setPhase('falling');
setTimeout(() => setPhase('done'), 800);
setTimeout(() => setPhase('idle'), 3500);
};
return (
<button onClick={handleClick} disabled={phase !== 'idle'}
style={{ width: 170, height: 50, borderRadius: 12, border: phase === 'done' ? '1px solid #86efac' : 'none', background: phase === 'done' ? '#15803d' : '#475569', color: '#fff', fontSize: 14, fontWeight: 'bold', cursor: 'pointer', position: 'relative', display: 'flex', alignItems: 'center', justifyContent: 'center', overflow: 'hidden', fontFamily: 'system-ui,sans-serif', transition: 'all 0.4s' }}>
<span>{phase === 'idle' ? '🀰 Execute Workflow' : phase === 'done' ? '✓ Done' : ''}</span>
</button>
);
}Vue
<template>
<button class="btn-domino" :class="phase" @click="handleClick" :disabled="phase!=='idle'">
<span class="text">{{ phase==='idle' ? 'Execute Workflow' : phase==='done' ? 'Done' : '' }}</span>
</button>
</template>
<script setup>
import { ref } from 'vue';
const phase = ref('idle');
function handleClick() {
if (phase.value !== 'idle') return;
phase.value = 'falling';
setTimeout(() => phase.value = 'done', 800);
setTimeout(() => phase.value = 'idle', 3500);
}
</script>Svelte
<script>
let phase = 'idle';
function handleClick() { if (phase !== 'idle') return; phase = 'falling'; setTimeout(() => phase = 'done', 800); setTimeout(() => phase = 'idle', 3500); }
</script>
<button class="btn-domino" class:is-done={phase==='done'} on:click={handleClick} disabled={phase!=='idle'}>
<span>{phase==='idle' ? '🀰 Execute Workflow' : phase==='done' ? '✓ Done' : ''}</span>
</button>Angular
import { Component } from '@angular/core';
@Component({
selector: 'app-domino-effect',
template: `<button class="btn-domino" [class.is-falling]="phase==='falling'" [class.is-done]="phase==='done'" (click)="handleClick()" [disabled]="phase!=='idle'"><span>{{ phase==='idle' ? '🀰 Execute Workflow' : phase==='done' ? '✓ Done' : '' }}</span></button>`,
styles: [`.btn-domino{width:170px;height:50px;border-radius:12px;border:none;background:#475569;color:#fff;font-size:14px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}.btn-domino.is-done{background:#15803d;border:1px solid #86efac}`]
})
export class DominoEffectComponent { phase='idle';handleClick(){if(this.phase!=='idle')return;this.phase='falling';setTimeout(()=>this.phase='done',800);setTimeout(()=>this.phase='idle',3500);}}LWC — HTML template
<template><button class="btn-domino" onclick={handleClick} disabled={disabled}><span>{label}</span></button></template>LWC — JavaScript
import { LightningElement } from 'lwc';
export default class DominoEffect extends LightningElement {
phase = 'idle';
get disabled() { return this.phase !== 'idle'; }
get label() { return this.phase==='idle'?'🀰 Execute Workflow':this.phase==='done'?'✓ Done':''; }
handleClick() { if(this.phase!=='idle')return;this.phase='falling';setTimeout(()=>this.phase='done',800);setTimeout(()=>this.phase='idle',3500); }
}LWC — CSS
.btn-domino{width:170px;height:50px;border-radius:12px;border:none;background:#475569;color:#fff;font-size:14px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;transition:all .4s}.btn-domino.is-done{background:#15803d;border:1px solid #86efac}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 Domino Effect fits
- Execute Workflow
- Process Chain
- Automation
- Pipeline
Interaction states & animations
- Domino Fall
- Chain Reaction
- Cascade
Topics
- #domino
- #chain
- #reaction
- #workflow
- #cascade
- #execute
Accessibility notes
Animation is decorative. Button text remains readable. Respect reduced-motion preference.
Browser support
- All modern browsers