Dev Helpers
← Back

Show which details panel is open

Show which details panel is open with native CSS. The preview includes a small shared demo stylesheet.

Open this example in the interactive library

Source code

<style>
  .demo[open] {
    border-inline-start: 4px solid #0f766e;
  }
</style>
<details class="demo">
  <summary>Show details</summary>
  <p>Open state applies a start border.</p>
</details>