Accordion

Basic Accordion

var accordion = new TablerAccordion();
accordion.AddItem("Section 1", item => {
    item.Content().Add(new TablerText("Content for section 1"));
});
accordion.AddItem("Section 2", item => {
    item.Content().Add(new TablerText("Content for section 2"));
});
accordion.AddItem("Section 3", item => {
    item.Content().Add(new TablerText("Content for section 3"));
});
page.Add(accordion);

First Item Open

accordion.AddItem("Overview", item => {
    item.Expanded();
    item.Content().Add(new TablerText("Shown on initial render."));
});

Nested Accordion

Accordions can be nested inside accordion items for hierarchical content organization.

Accordion Styles

The accordion supports multiple visual styles for different use cases.