A compact, dependency‑free password strength meter with live feedback on a dark background.
★ 0 community votes · Safety scan passed · Sandboxed previewPassword Strength Meter 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.
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.
How would you characterize this AI-generated component for your projects?
Select an evaluation tag above to record your vote.
<div id="pwd-meter"><input id="pwd-input" type="password" placeholder="Password"><div id="meter"><div id="meter-bar"></div></div><div id="pwd-label"></div></div>
#pwd-meter{max-width:300px;margin:20px auto;font-family:sans-serif;background:#222;padding:10px;border-radius:8px;}#pwd-input{width:100%;padding:8px;border:none;border-radius:4px;background:#333;color:#fff;}#meter{height:8px;background:#555;margin-top:6px;border-radius:4px;overflow:hidden;}#meter-bar{height:100%;background:#0f0;width:0%;transition:width .3s,background .3s;}#pwd-label{margin-top:4px;color:#bbb;font-size:12px;text-align:center;}
const input=document.getElementById('pwd-input'),bar=document.getElementById('meter-bar'),label=document.getElementById('pwd-label');input.addEventListener('input',()=>{const pwd=input.value;let score=0;if(pwd.length>=8)score++;if(/[A-Z]/.test(pwd))score++;if(/[a-z]/.test(pwd))score++;if(/[0-9]/.test(pwd))score++;if(/[^A-Za-z0-9]/.test(pwd))score++;const pct=score*20;bar.style.width=pct+'%';switch(score){case 0:bar.style.background='#f00';label.textContent='Very Weak';break;case 1:bar.style.background='#f90';label.textContent='Weak';break;case 2:bar.style.background='#ff0';label.textContent='Fair';break;case 3:bar.style.background='#0f0';label.textContent='Good';break;case 4:bar.style.background='#0cf';label.textContent='Strong';break;case 5:bar.style.background='#06f';label.textContent='Very Strong';break;}});