Each widget below demonstrates an accessible expand/collapse pattern. Controlled content containers use the details class.
Content is visible by default. The JavaScript will set an inline max-height to allow a smooth transition if the user collapses it.
Tip: You can include any markup inside a details container — text, images, forms, etc.