See drawer-cart.liquid or password-page-modal.liquid for reference. Accordions are done with details HTML5 element.
Theme's global.js includes Woolman.ModalsAndDrawers object which enriches basic functionality of modals and drawers. Methods:
If a link contains word modal or drawer, this function tries to locate element with matching id to initialize as modal or drawer. E.g. link with href="#drawer-menu" tries to initialize element with id="drawer-menu" as a drawer.
This function opens modal or drawer with provided id.
This function closes modal or drawer with provided id.