Opener

wrappers: dict
theme: dict

 

__init__(self, items, base_name=None, open=False, on_open=None, **attrs): 

LLM Docstring

A collapsible opener (a simpler, single-level accordion-style disclosure).

  • items: Any

    the {label: content} items

  • base_name: Any

    the id prefix

  • open: bool

    start expanded

  • on_open: Any

    callable(label) run when an item’s header is clicked (it fires on closing too, so make it idempotent). Lets an item’s content be built the first time it is wanted.

  • attrs: Any

    extra attributes

 

create_item(self, item, open=None, **kw): 

LLM Docstring

Build an opener item (header plus collapsible body).

  • item: Any

    the item spec

  • open: Any

    start expanded

  • kw: Any

    extra options

  • :returns: _

    the item element


Feedback

Examples

Templates

Documentation