{"id":24135040,"url":"https://github.com/informatix8/access-dropdown","last_synced_at":"2026-03-06T05:40:30.349Z","repository":{"id":57118646,"uuid":"186056805","full_name":"informatix8/access-dropdown","owner":"informatix8","description":"Auto-positioning accessible dropdown","archived":false,"fork":false,"pushed_at":"2019-06-25T14:21:56.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T09:19:32.298Z","etag":null,"topics":["a11y","dropdown","vanilla-javascript"],"latest_commit_sha":null,"homepage":"https://access-dropdown.com/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/informatix8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-10T21:31:46.000Z","updated_at":"2019-07-22T17:04:40.000Z","dependencies_parsed_at":"2022-08-23T05:21:16.779Z","dependency_job_id":null,"html_url":"https://github.com/informatix8/access-dropdown","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/informatix8%2Faccess-dropdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/informatix8%2Faccess-dropdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/informatix8%2Faccess-dropdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/informatix8%2Faccess-dropdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/informatix8","download_url":"https://codeload.github.com/informatix8/access-dropdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241356354,"owners_count":19949509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a11y","dropdown","vanilla-javascript"],"created_at":"2025-01-12T01:19:09.533Z","updated_at":"2026-03-06T05:40:30.202Z","avatar_url":"https://github.com/informatix8.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Access Dropdown\n\nAuto-positioning accessible dropdown.\n\nExamples and the API are in the [documentation](https://access-dropdown.com/).\n\n\n## Features\n- Auto-positioning with `requestAnimationFrame`: the dropdown tries to stay on screen\n- Click outside to dismiss\n- Press `Esc` to dismiss\n- Click the `X` to dismiss on small screens\n- When focus finally leaves the dropdown’s content when using `Tab`, the dropdown is dismissed\n- Inline styles can be disabled\n- After dismissal, focus is returned to the last focused element or a designated element\n- Pre and post user defined functions can be called during significant events\n\n## Usage\n\n### Install\n\n```shell\nnpm install @informatix8/access-dropdown --save-dev\n```\n\n### CDN\n\n```html\n\u003cscript src=\"https://unpkg.com/@informatix8/access-dropdown/dist/access-dropdown.all.umd.js\"\u003e\u003c/script\u003e\n```\n\n### Vanilla Javascript\n```javascript\nvar dropdowns = document.querySelectorAll('.my-dropdown');\n\nfor (var i = 0; i \u003c dropdowns.length; i++) {\n    var dropdown = new AccessDropdown({\n        el: dropdowns[i],\n        callbacks: {\n            preOpen: function () { //user callback\n                console.log('before it is opened');\n            },\n            postClose: function (reason) { //user callback\n                console.log('dropdown was closed for', reason);\n            }\n        }\n    });\n}\n```\n\n```html\n\u003cdiv class=\"my-dropdown\"\u003e\n    \u003cbutton class=\"access-dropdown-toggle\"\u003eHello Trigger\u003c/button\u003e\n    \u003cdiv class=\"access-dropdown-menu\"\u003e\n        \u003cdiv class=\"access-dropdown-close-area\"\u003e\n            \u003cbutton class=\"access-dropdown-close\" aria-label=\"Close dropdown\"\u003e\n              \u0026times;\n            \u003c/button\u003e\n        \u003c/div\u003e\n        \u003cul class=\"access-dropdown-list\"\u003e\n            \u003cli\u003e\u003ca class=\"access-dropdown-link\" href=\"javascript:void(0)\"\u003eDonec nec nisi id turpis placerat facilisis.\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca class=\"access-dropdown-link\" href=\"javascript:void(0)\"\u003eIn pulvinar scelerisque egestas. Mauris eget nisl ut dolor sodales ullamcorper.\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca class=\"access-dropdown-link\" href=\"javascript:void(0)\"\u003eCras iaculis egestas rhoncus. Pellentesque sed metus id ligula suscipit sollicitudin at id velit.\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca class=\"access-dropdown-link\" href=\"javascript:void(0)\"\u003eDonec ultrices odio sit amet sodales porta.\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca class=\"access-dropdown-link\" href=\"javascript:void(0)\"\u003eDonec elit turpis, convallis eu mollis eget, feugiat in ipsum.\u003c/a\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\n## Development\n\n```shell\nnpm run dev\n```\n\n## Build\n\n```shell\nnpm run build\n```\n\n## Release\n\n```shell\nnpm run build\ngit tag -a vX.Y.Z\ngit push origin master\ngit push origin --tags\nnpm publish --access=public .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finformatix8%2Faccess-dropdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finformatix8%2Faccess-dropdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finformatix8%2Faccess-dropdown/lists"}