Skip to content

Collapsible

Giorgio Garofalo edited this page Oct 17, 2024 · 3 revisions

The .collapse function creates an interactive collapsible block, whose status can be toggled by clicking.

It requires an inline title (always displayed) and block content (displayed when expanded).

.collapse {A _collapsible_ block. **Click me!**}
  Hidden content...  
  **Surprise!**

  .loremipsum

Collapsed:
Collapsed

Expanded:
Expanded

 

The initial status of a block can be changed via the optional open Boolean argument, which defaults to false (collapsed).

.collapse {A _collapsible_ block. **Click me!**} open:{yes}
  ...
Clone this wiki locally