A menu that's opened with a <details> button.
$ npm install @github/details-menu-element
import '@github/details-menu-element'<details>
<summary>Robots</summary>
<details-menu>
<ul>
<li><button type="button" role="menuitem">Hubot</button></li>
<li><button type="button" role="menuitem">Bender</button></li>
<li><button type="button" role="menuitem">BB-8</button></li>
</ul>
</details-menu>
</details>Menu content can be loaded from a server by embedding an
<include-fragment> element.
<details>
<summary>Robots</summary>
<details-menu src="/robots">
<include-fragment>Loading…</include-fragment>
</details-menu>
</details>The src attribute value is copied to the <include-fragment> the first
time the <details> button is toggled open, which starts the server fetch.
Browsers without native custom element support require a polyfill.
- Chrome
- Firefox
- Safari
- Internet Explorer 11
- Microsoft Edge
npm install
npm test
Distributed under the MIT license. See LICENSE for details.