MorphCanvas
Home › Gallery › FAQ Accordion
Reading size:

FAQ Accordion

A dark-themed, smooth expanding FAQ accordion widget.

★ 0 community votes · Safety scan passed · Sandboxed preview
Listen to Component Overview (AI Narration)
Viewport:
Backdrop:
Safety Scan
Verified Safe (0 Violations)
Sandbox Isolation
Active (allow-scripts)
Code Dependencies
Zero / Standalone Vanilla
Last Synthesized
2026-11-25

About this component

FAQ Accordion 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 Code

HTML
<div class='faq'><div class='item'><div class='question'>What is MorphCanvas?</div><div class='answer'>MorphCanvas is a lightweight UI component framework.</div></div><div class='item'><div class='question'>How do I use it?</div><div class='answer'>Include the HTML, CSS, and JS in your page. It’s self-contained and dependency-free.</div></div></div>
CSS
body{margin:0;background:#111;color:#eee;font-family:sans-serif}.faq{background:#222;padding:1rem;border-radius:8px}.item{margin-bottom:.8rem}.question{cursor:pointer;padding:.5rem;background:#333;border-radius:4px}.answer{max-height:0;overflow:hidden;transition:max-height .3s ease;background:#444;padding:0 .5rem;border-radius:4px;margin-top:.3rem}
JavaScript
document.querySelectorAll('.faq .item').forEach(item=>{const q=item.querySelector('.question');const a=item.querySelector('.answer');q.addEventListener('click',()=>{const open=item.classList.toggle('open');if(open){a.style.maxHeight=a.scrollHeight+'px'}else{a.style.maxHeight='0'}})});
Build your own on MorphCanvas
Copied to clipboard!