Last active
November 6, 2022 15:35
-
-
Save gobijan/a67274a16d3a8df7ac218ae9d7bf445a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- HEADLESSUI DROPDOWN THOUGHT EXPERIMENT FOR A JS-ONLY CORE LIB --> | |
<div data-headlessui-dropdown> | |
<button class="..." type="button" data-headlessui-dropdown-toggle> | |
Dropdown button | |
</button> | |
<ul data-headlessui-dropdown-menu> | |
<li><a class="..." href="#">Action</a></li> | |
<li><a class="..." href="#">Another action</a></li> | |
<li><a class="..." href="#">Something else here</a></li> | |
</ul> | |
</div> | |
<!-- | |
aria-expanded="false" and other a11y keyboard stuff is set programatically via the headless core js lib | |
boolean data attributes should be fine https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment