Each widget is wrapped in an .example container. The collapsible content uses a container with the .details class.
This is a straightforward expand/collapse widget. Click the button to reveal more text.
It demonstrates the basic pattern: a control button and a content container that shows or hides.
Here is a small list that becomes visible when expanded:
Inline code sample shown when expanded:
function greet(name) {
return "Hello, " + name + "!";
}
console.log(greet("World"));