{"id":15994420,"url":"https://github.com/oskarrough/command-menu","last_synced_at":"2026-04-28T11:02:55.612Z","repository":{"id":151237899,"uuid":"391947206","full_name":"oskarrough/command-menu","owner":"oskarrough","description":"A command menu for the web. Autocomplete adventures","archived":false,"fork":false,"pushed_at":"2023-06-23T21:59:01.000Z","size":66,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-10T08:31:52.221Z","etag":null,"topics":["command-palette","web-components"],"latest_commit_sha":null,"homepage":"https://command-menu.pages.dev/","language":"JavaScript","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/oskarrough.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-02T12:49:55.000Z","updated_at":"2023-05-31T08:12:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"70fd11b4-9477-4e17-953f-b52a444c3289","html_url":"https://github.com/oskarrough/command-menu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskarrough%2Fcommand-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskarrough%2Fcommand-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskarrough%2Fcommand-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskarrough%2Fcommand-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oskarrough","download_url":"https://codeload.github.com/oskarrough/command-menu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266566,"owners_count":20910837,"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":["command-palette","web-components"],"created_at":"2024-10-08T07:08:52.284Z","updated_at":"2026-04-28T11:02:50.576Z","avatar_url":"https://github.com/oskarrough.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Command Menu\n\nA command menu, palette for the web. Similar to ctrl+k or ctrl+p in code editors.\n\n## Features\n\n- is a web component\n- accessible UI (hopefully)\n- fuzzy search using [farzher/fuzzysort](https://github.com/farzher/fuzzysort)\n- optional modal UI with keybindings\n- can call arbitrary commands and functions\n- attempted to make focus navigation feel natural\n\n## How to use\n\nSince it's not on npm yet you'll have to copy the files for now. Also see index.html for a complete example.\n\n1. Include the script\n2. Include the styles\n3. Add `\u003ccommand-menu\u003e` element to your page\n4. Pass it your commands like so:\n\n```js\n/**\n * @typedef {Object} Command\n * @property {String} title - The title of the command\n * @property {String} [subtitle] - A description of the command\n * @property {String} [shortcut] - A keyboard shortcut, e.g. \"Ctrl+K\"\n * @property {Function} [action] - The function to call when the command is selected\n * @property {Array\u003cCommand\u003e} [children] - A list of child commands\n */\nconst commands = [\n  {title: 'Play track', shortcut: 'p', },\n  {title: 'Stop track', shortcut: 'n'},\n  {title: 'Help', action: () =\u003e { confirm('Send help please') }},\n\t{title: 'Typography', children: [{title: 'Bold'}, {title: 'Italic'}]}\n]\ndocument.querySelector('command-menu').list = commands\n```\n\n## References\n\n- https://developer.mozilla.org/en-US/docs/Web/Accessibility/Keyboard-navigable_JavaScript_widgets\n- https://www.w3.org/WAI/tutorials/menus/application-menus/#keyboard-behavior\n- https://github.com/Heydon/inclusive-menu-button/blob/master/inclusive-menu-button.js\n- https://headlessui.com/react/combobox#combobox\n- https://developers.raycast.com/basics/prepare-an-extension-for-store#ui-ux-guidelines\n- https://github.com/pacocoursey/cmdk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foskarrough%2Fcommand-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foskarrough%2Fcommand-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foskarrough%2Fcommand-menu/lists"}