There is already an existing component to show/hide content, Collapse.
However, it doesn't follow the Pajamas specification: