A compact, dependency-free FAQ accordion with smooth expand/collapse on a dark background.
★ 0 community votes · Safety scan passed · Sandboxed previewFAQ Accordion 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.
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.
<div class="faq-accordion"><div class="faq-item"><button class="faq-header">What is MorphCanvas?</button><div class="faq-content"><p>MorphCanvas is a lightweight UI framework.</p></div></div><div class="faq-item"><button class="faq-header">How to use it?</button><div class="faq-content"><p>Include the component and call init.</p></div></div></div>
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#222;color:#eee}.faq-accordion{max-width:600px;margin:20px auto}.faq-item{border-bottom:1px solid #444}.faq-header{background:none;border:none;color:#eee;width:100%;text-align:left;padding:15px;font-size:1.1em;cursor:pointer;outline:none}.faq-content{overflow:hidden;max-height:0;transition:max-height .3s ease}.faq-content p{margin:0;padding:15px;background:#333}
document.addEventListener('DOMContentLoaded',function(){var h=document.querySelectorAll('.faq-header');h.forEach(function(b){b.addEventListener('click',function(){var c=this.nextElementSibling;c.style.maxHeight=c.style.maxHeight?'0':''+c.scrollHeight+'px'})})})
Build your own on MorphCanvas