Process Flow Build
Four steps appear one at a time, each joined to the last by a line that draws itself.
AI prompt
Clean explainer diagram of a four-step workflow on a pale background: four evenly spaced rounded nodes numbered 1 to 4 with the verbs Collect, Clean, Analyse and Share, joined left to right by thin dark connector lines with small arrowheads, the first three steps complete in dark and the fourth just appearing in outline, flat vector style, plenty of white space. Negative: gradients, shadows, clutter, text errors, 3D. Reduced motion: complete static diagram.About this pattern
Definition
A process flow shows how things connect in order. Building it step by step, with a connecting line that draws before the next node appears, lets the viewer follow the sequence at the pace of the narration instead of reading a finished diagram all at once.
When to use it
- Draw the line first, then pop the node at its end; the line points the eye to what is coming.
- Keep nodes the same size and evenly spaced so the rhythm reads as a sequence.
- Give each step a short verb label: Collect, Clean, Analyse, Share.
What the controls do
- Play, Step and Reset buttons.
Motion & timing
- Each line draws in 350ms and each node pops in 250ms; Play runs the full flow in about 2.5s.
- Reduced motion: all steps appear at once.
Tips & variations
- Offer Step as well as Play so a presenter can control the pace.
- Do not rely on colour alone to show order; use numbers.
Code of this live preview
<div class="bx"><div class="fl" id="fl"></div><div class="row2"><button class="mini" id="pl" type="button">Play</button><button class="mini" id="st" type="button">Step</button><button class="mini" id="rs" type="button">Reset</button></div><p class="out" id="out" aria-live="polite"></p></div>:root{--bg:#F1F1EF;--surface:#fff;--surface-2:#F7F7F5;--line:#E0E0DC;--text:#171717;--muted:#6f6f6f;--accent:#171717;--accent-ink:#fff;--danger:#d92d20}
*{box-sizing:border-box;margin:0}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}a{color:inherit;text-decoration:none}ul,ol,p,h4{margin:0;padding:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pre{display:flex;gap:5px;flex-wrap:wrap}.pre button{height:28px;padding:0 11px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.bx{width:min(330px,100%);display:grid;gap:9px}.rw{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.rw b{color:var(--text);font-weight:600}input[type=range]{width:100%;accent-color:#171717}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.fl{display:flex;align-items:center;justify-content:space-between;padding:22px 8px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.nd{width:62px;display:grid;justify-items:center;gap:6px;font-size:11.5px;font-weight:600;opacity:0;transform:scale(.8);transition:opacity .25s,transform .25s}.nd.on{opacity:1;transform:none}.nd i{width:38px;height:38px;border-radius:50%;background:#171717;color:#fff;display:grid;place-items:center;font-style:normal;font-size:14px}
.ln{flex:1;height:2px;background:#171717;transform:scaleX(0);transform-origin:0 50%;transition:transform .35s;margin:0 2px 20px;position:relative}.ln.on{transform:none}.ln::after{content:"";position:absolute;right:-1px;top:-3px;border:4px solid transparent;border-left:6px solid #171717;border-right:0}
.row2{display:flex;gap:8px;margin-top:8px}.out{font-size:12px;color:var(--muted);min-height:18px;margin-top:6px}
.mini{height:30px;padding:0 14px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:12px;font-weight:600;cursor:pointer}.mini:disabled{opacity:.4;cursor:default}@media (prefers-reduced-motion:reduce){.nd,.ln{transition:none}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}const S=['Collect','Clean','Analyse','Share'],D=['Gather the raw data.','Remove errors and duplicates.','Find patterns and totals.','Publish the result.'],fl=document.getElementById('fl'),out=document.getElementById('out'),calm=matchMedia('(prefers-reduced-motion:reduce)').matches;let n=0,tm=[];
fl.innerHTML=S.map((s,i)=>(i?'<span class="ln"></span>':'')+'<div class="nd"><i>'+(i+1)+'</i>'+s+'</div>').join('');const nd=[...fl.querySelectorAll('.nd')],ln=[...fl.querySelectorAll('.ln')];
function set(k){n=k;nd.forEach((e,i)=>e.classList.toggle('on',i<k));ln.forEach((e,i)=>e.classList.toggle('on',i<k-1));out.textContent=k?'Step '+k+': '+D[k-1]:'';}
function step(){if(n<S.length)set(n+1);}function clr(){tm.forEach(clearTimeout);tm=[];}
document.getElementById('st').addEventListener('click',()=>{clr();step();});document.getElementById('rs').addEventListener('click',()=>{clr();set(0);});
document.getElementById('pl').addEventListener('click',()=>{clr();set(0);if(calm){set(S.length);return;}S.forEach((s,i)=>tm.push(setTimeout(()=>set(i+1),i*650+150)));});set(0);setTimeout(()=>document.getElementById('pl').click(),300);One complete HTML file. Save it and open it in a browser.
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Process Flow Build — demo</title>
<style>
:root{--bg:#F1F1EF;--surface:#fff;--surface-2:#F7F7F5;--line:#E0E0DC;--text:#171717;--muted:#6f6f6f;--accent:#171717;--accent-ink:#fff;--danger:#d92d20}
*{box-sizing:border-box;margin:0}
html,body{height:100%}body{background:var(--bg);color:var(--text);font:15px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',Inter,Roboto,sans-serif;-webkit-font-smoothing:antialiased}.stage{min-height:100%;display:grid;place-items:center;padding:24px}button,input,select,textarea{font-family:inherit}@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}a{color:inherit;text-decoration:none}ul,ol,p,h4{margin:0;padding:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pre{display:flex;gap:5px;flex-wrap:wrap}.pre button{height:28px;padding:0 11px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.bx{width:min(330px,100%);display:grid;gap:9px}.rw{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.rw b{color:var(--text);font-weight:600}input[type=range]{width:100%;accent-color:#171717}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.fl{display:flex;align-items:center;justify-content:space-between;padding:22px 8px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.nd{width:62px;display:grid;justify-items:center;gap:6px;font-size:11.5px;font-weight:600;opacity:0;transform:scale(.8);transition:opacity .25s,transform .25s}.nd.on{opacity:1;transform:none}.nd i{width:38px;height:38px;border-radius:50%;background:#171717;color:#fff;display:grid;place-items:center;font-style:normal;font-size:14px}
.ln{flex:1;height:2px;background:#171717;transform:scaleX(0);transform-origin:0 50%;transition:transform .35s;margin:0 2px 20px;position:relative}.ln.on{transform:none}.ln::after{content:"";position:absolute;right:-1px;top:-3px;border:4px solid transparent;border-left:6px solid #171717;border-right:0}
.row2{display:flex;gap:8px;margin-top:8px}.out{font-size:12px;color:var(--muted);min-height:18px;margin-top:6px}
.mini{height:30px;padding:0 14px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:12px;font-weight:600;cursor:pointer}.mini:disabled{opacity:.4;cursor:default}@media (prefers-reduced-motion:reduce){.nd,.ln{transition:none}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
</style></head>
<body><div class="stage">
<div class="bx"><div class="fl" id="fl"></div><div class="row2"><button class="mini" id="pl" type="button">Play</button><button class="mini" id="st" type="button">Step</button><button class="mini" id="rs" type="button">Reset</button></div><p class="out" id="out" aria-live="polite"></p></div>
</div>
<script>
const S=['Collect','Clean','Analyse','Share'],D=['Gather the raw data.','Remove errors and duplicates.','Find patterns and totals.','Publish the result.'],fl=document.getElementById('fl'),out=document.getElementById('out'),calm=matchMedia('(prefers-reduced-motion:reduce)').matches;let n=0,tm=[];
fl.innerHTML=S.map((s,i)=>(i?'<span class="ln"></span>':'')+'<div class="nd"><i>'+(i+1)+'</i>'+s+'</div>').join('');const nd=[...fl.querySelectorAll('.nd')],ln=[...fl.querySelectorAll('.ln')];
function set(k){n=k;nd.forEach((e,i)=>e.classList.toggle('on',i<k));ln.forEach((e,i)=>e.classList.toggle('on',i<k-1));out.textContent=k?'Step '+k+': '+D[k-1]:'';}
function step(){if(n<S.length)set(n+1);}function clr(){tm.forEach(clearTimeout);tm=[];}
document.getElementById('st').addEventListener('click',()=>{clr();step();});document.getElementById('rs').addEventListener('click',()=>{clr();set(0);});
document.getElementById('pl').addEventListener('click',()=>{clr();set(0);if(calm){set(S.length);return;}S.forEach((s,i)=>tm.push(setTimeout(()=>set(i+1),i*650+150)));});set(0);setTimeout(()=>document.getElementById('pl').click(),300);
</script>
</body></html>