MorphCanvas
HomeGallery › Profile Card Widget

Profile Card Widget

Compact dark-themed profile card with avatar initials, role badge, and follow button.

★ 0 community votes · Safety scan passed · Sandboxed preview

About this component

Profile Card Widget 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="profile-card"><div class="avatar" role="img" aria-label="John Doe">JD</div><h2 class="name">John Doe</h2><span class="badge">Admin</span><button class="follow-btn" aria-pressed="false">Follow</button></div>

CSS

.profile-card{background:#222;color:#fff;padding:1rem;border-radius:.5rem;width:200px;font-family:sans-serif;display:flex;flex-direction:column;align-items:center;gap:.5rem}.avatar{background:#444;color:#fff;width:3rem;height:3rem;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.2rem}.name{margin:0;font-size:1.1rem}.badge{background:#ff5a5f;color:#fff;padding:.2rem .5rem;border-radius:.3rem;font-size:.8rem}.follow-btn{background:#ff5a5f;color:#fff;border:none;padding:.4rem 1rem;border-radius:.3rem;font-size:.9rem;cursor:pointer}.follow-btn:hover{background:#e04b4e}

JavaScript

document.addEventListener('DOMContentLoaded',()=>{const btn=document.querySelector('.follow-btn');btn.addEventListener('click',()=>{const pressed=btn.getAttribute('aria-pressed')==='true';btn.setAttribute('aria-pressed',!pressed);btn.textContent=pressed?'Follow':'Following';})});
Build your own on MorphCanvas