Accordion
FAQ
Yes. It adheres to the WAI-ARIA design pattern.
Yes. It comes with a default theme that matches shadcn.
Yes. JavaScript handles expand/collapse with ARIA state.
Multiple
Content for Section A with relevant information.
Content for Section B with additional details.
Content for Section C with more information.
Usage
use maud_ui::primitives::accordion;
use maud::html;
let html = accordion::render(accordion::Props {
items: vec![
accordion::Item { id: "faq-1".into(), trigger: "What is maud-ui?".into(), content: html! { p { "A component library for maud + htmx." } }, open: true },
accordion::Item { id: "faq-2".into(), trigger: "Is it free?".into(), content: html! { p { "Yes, MIT licensed." } }, open: false },
],
multiple: false,
});