Details Summary Disclosure Widget

Create a native disclosure widget using the details and summary elements with custom styling and open event handling.

HtmlForm Validation

Code

snippet
<details>
  <summary>Advanced Settings</summary>
  <form>
    <label>
      <input type="checkbox" name="debug" />
      Enable debug mode
    </label>
    <label>
      Max connections:
      <input type="number" name="maxconn" value="10" min="1" max="100" />
    </label>
    <button type="submit">Save</button>
  </form>
</details>