Accordion

A tiny fine-grained reactive UI library — signals, no virtual DOM, no build step.

Usage

import { Accordion } from "./components/accordion.js";

// multi-open; each body is built only while open (effects dispose on collapse).
// item.text for plain text, or item.content: () => html`…` for rich bodies.
Accordion({ defaultOpen: ["1"], items: [
  { id: "1", title: "What is zap?", text: "A tiny reactive UI library." },
  { id: "2", title: "Why no virtual DOM?", text: "Updates touch only the exact node." },
] })