Expand/Collapse Widget Demo

Each widget is wrapped in an element with the class "example". The collapsible content container uses the class "details".

This is a basic expand/collapse widget. Click the button above to reveal this paragraph of text.

The container that shows or hides the content has the class "details".

Profile summary:

  • Jane Doe — Software Engineer
  • Location: Remote
  • Interests: UI design, accessibility, and performance

Code snippet example:

// Simple greeting function
function greet(name) {
  return `Hello, ${name}!`;
}
console.log(greet("World"));