MorphCanvas
HomeGallery › Weekly Habit Tracker

Weekly Habit Tracker

A minimalist, dark-themed weekly habit tracker grid with clickable day cells.

★ 0 community votes · Safety scan passed · Sandboxed preview

About this component

Weekly Habit Tracker is an interface component generated on MorphCanvas, an infinite AI workspace that turns written intent into reviewable HTML, CSS, and JavaScript widgets. This component passed MorphCanvas’s automated safety scan, which checks for unsafe patterns such as external network calls, storage access, inline event handlers, and code execution, and it is rendered here inside a sandboxed preview frame.

How it was built

A creator described the result they wanted, MorphCanvas routed the request through its AI provider chain with automatic failover, scanned the generated code, and published the reviewed component to the public library. You can build and publish your own components on the MorphCanvas canvas.

Source

HTML

<div class="habit-grid" aria-label="Weekly habit tracker"><button class="day" aria-label="Monday"></button><button class="day" aria-label="Tuesday"></button><button class="day" aria-label="Wednesday"></button><button class="day" aria-label="Thursday"></button><button class="day" aria-label="Friday"></button><button class="day" aria-label="Saturday"></button><button class="day" aria-label="Sunday"></button></div>

CSS

:root{--bg:#222;--cell:#444;--done:#4caf50;--text:#fff;}body{background:var(--bg);color:var(--text);font-family:sans-serif;margin:0;display:flex;justify-content:center;align-items:center;height:100vh;} .habit-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;width:280px;} .day{background:var(--cell);border:none;border-radius:4px;height:40px;cursor:pointer;} .day:focus{outline:2px solid var(--done);} .day.done{background:var(--done);}

JavaScript

document.querySelectorAll('.day').forEach(btn=>{btn.addEventListener('click',()=>{btn.classList.toggle('done');});});
Build your own on MorphCanvas