bootstack.AccordionSection#
- class bootstack.AccordionSection(internal_expander, *, key, layout='column', padding=None, gap=0, horizontal_items=None, vertical_items=None, grow_items=False, columns=None, rows=None, auto_flow='row')#
Bases:
objectA handle for one accordion section — both a layout context and a live controller.
Returned by
Accordion.add()and byAccordion.item()/items(). Use it as awithblock to place child widgets inside the section, and read or callkey/title/expanded/expand()/collapse()/toggle()to inspect or drive the section afterward.As a context manager it accepts the same layout kwargs as the standalone layout containers —
layout=,gap=,horizontal_items=,vertical_items=,grow_items=,columns=,rows=,auto_flow=.- collapse()#
Collapse this section.
- expand()#
Expand this section.
- guide_layout(child, **layout_kw)#
- toggle()#
Toggle this section between expanded and collapsed.