generic-disclosure
WAI ARIA PracticesA disclosure is a button that controls visibility of a section of content.
API:
| name | detail |
|---|---|
| opened-changed | boolean |
| name | type |
|---|---|
| expanded | boolean |
| name | type |
|---|---|
| expanded | boolean |
| name | description |
|---|---|
| toggle | Provide a button element as lightdom |
| detail | Provide a content node as lightdom |
Usage:
The disclosure component requires a button child with a slot="toggle" for the trigger, and a
generic content node slot="detail" for the content.
Default:
Show code
<generic-disclosure>
<button slot="toggle">toggle me</button>
<p slot="detail">i am content</p>
</generic-disclosure>
i am content
Expanded:
Show code
<generic-disclosure expanded>
<button slot="toggle">toggle me</button>
<p slot="detail">i am content</p>
</generic-disclosure>
i am expanded!