<baht-accordion>
Collapsible panels. multiple allows several open at once.
Basic
Events (name)
<baht-accordion></baht-accordion>
<script>
const el = document.querySelector('baht-accordion');
el.items = [
{
"title": "What is bahtui?",
"content": "A JSON-driven form + workflow engine shipped as Web Components.",
"open": true
},
{
"title": "Does it work with React?",
"content": "Yes. Any framework, or none. Web Components are framework-neutral."
},
{
"title": "Who owns the data?",
"content": "You. The components are controlled: JSON in, events out."
}
];
</script>| Name | Type | Default | Description |
|---|---|---|---|
itemsJS | AccordionItem[] | [] | { title, content, open? } |
multiple | boolean | false | Allow several panels open |
Events
Section titled “Events”| Event | detail | Description |
|---|---|---|
name | CustomEvent | |
baht-toggle | { index, open } | Panel toggled |