MorphCanvas
HomeGallery › Dark Tabbed Card

Dark Tabbed Card

A compact, dependency-free tabbed content switcher card styled for dark backgrounds.

★ 0 community votes · Safety scan passed · Sandboxed preview

About this component

Dark Tabbed Card 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='tab-card'><div class='tabs'><button class='tab active' data-tab='0'>Tab 1</button><button class='tab' data-tab='1'>Tab 2</button><button class='tab' data-tab='2'>Tab 3</button></div><div class='panels'><div class='panel active' data-index='0'>Content for Tab 1</div><div class='panel' data-index='1'>Content for Tab 2</div><div class='panel' data-index='2'>Content for Tab 3</div></div></div>

CSS

 .tab-card{background:#1e1e1e;color:#f0f0f0;font-family:Arial,Helvetica,sans-serif;border-radius:8px;overflow:hidden;width:300px;margin:20px auto;} .tabs{display:flex;border-bottom:1px solid #333;} .tab{flex:1;padding:10px 0;background:#2e2e2e;border:none;cursor:pointer;font-size:14px;color:#bbb;} .tab.active{background:#444;color:#fff;} .tab:hover{background:#3a3a3a;} .panels{padding:15px;} .panel{display:none;} .panel.active{display:block;}

JavaScript

document.addEventListener('DOMContentLoaded',()=>{const tabs=document.querySelectorAll('.tab-card .tab');const panels=document.querySelectorAll('.tab-card .panel');tabs.forEach(t=>t.addEventListener('click',()=>{const idx=t.dataset.tab;tabs.forEach(b=>b.classList.remove('active'));panels.forEach(p=>p.classList.remove('active'));t.classList.add('active');panels[idx].classList.add('active');}));});
Build your own on MorphCanvas