Back to templates
Lightweight Kanban board
A three-column interactive task board where clicking a card advances it to the next stage.
Source code
1 lines · 1.3 KB<style>*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,sans-serif;background:#f6f7fb;color:#172033}button,a{font:inherit}.wrap{width:min(960px,calc(100% - 32px));margin:auto}</style><style>main{padding:28px 16px}.board{max-width:960px;margin:auto;display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.col{background:#eef1f6;border-radius:14px;padding:14px}.col h2{font-size:14px;text-transform:uppercase;margin:0 0 12px;color:#475569}.task{background:#fff;border:1px solid #dbe1ec;border-radius:10px;padding:12px;margin-bottom:10px;cursor:pointer}.task small{color:#64748b}@media(max-width:700px){.board{grid-template-columns:1fr}}</style><main><div class="board" id="board"></div></main><script>const cols=["To Do","In Progress","Done"];const items=[{t:"Draft hero copy",c:0},{t:"Test 390px layout",c:1},{t:"Publish share link",c:2}];function draw(){const b=document.getElementById("board");b.innerHTML="";cols.forEach((name,ci)=>{const col=document.createElement("section");col.className="col";col.innerHTML="<h2>"+name+"</h2>";items.filter(x=>x.c===ci).forEach(x=>{const card=document.createElement("div");card.className="task";card.innerHTML="<strong>"+x.t+"</strong><br><small>Click to advance</small>";card.onclick=()=>{x.c=(x.c+1)%cols.length;draw()};col.appendChild(card)});b.appendChild(col)})}draw()</script>When this template fits
A lightweight interactive task board for sprint demos, workshop planning, or teaching state transitions in plain JavaScript.
How the layout works
Three equal columns (To Do, In Progress, Done) render dynamically from a single array and collapse into a vertical stack on mobile.
What to customize
Add an input form to create tasks, persist state to localStorage if single-browser memory is desired, or color-code priority tags with text labels.
Review before publishing
Replace click-only card advances with explicit move buttons or keyboard handlers if accessibility for keyboard users is required.
Keep building with context
Compare a related pattern or read a practical guide before adapting this example in the Playground.