Yes, you can use a “PanelExpanderButton” in your template. Search the samples for uses of that kind of button. I think the IVRtree and umlClass samples use it.
If you are curious about how the “PanelExpanderButton” panel is defined, you can find its definition in extensions/Buttons.js.