{"id":14973747,"url":"https://github.com/james2doyle/vue-omnibar","last_synced_at":"2025-07-02T16:36:57.598Z","repository":{"id":45871694,"uuid":"310675799","full_name":"james2doyle/vue-omnibar","owner":"james2doyle","description":"Create modal popups that emulate omnibar, command palette, open anywhere, or other \"search and act\" functions/features","archived":false,"fork":false,"pushed_at":"2021-11-30T22:16:46.000Z","size":903,"stargazers_count":16,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-20T13:56:52.714Z","etag":null,"topics":["component","omnibar","vue"],"latest_commit_sha":null,"homepage":"https://james2doyle.github.io/vue-omnibar/","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/james2doyle.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":"2020-11-06T18:27:59.000Z","updated_at":"2023-10-17T16:08:09.000Z","dependencies_parsed_at":"2022-09-03T04:11:26.997Z","dependency_job_id":null,"html_url":"https://github.com/james2doyle/vue-omnibar","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/james2doyle/vue-omnibar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fvue-omnibar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fvue-omnibar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fvue-omnibar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fvue-omnibar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/james2doyle","download_url":"https://codeload.github.com/james2doyle/vue-omnibar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fvue-omnibar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261700274,"owners_count":23196491,"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":["component","omnibar","vue"],"created_at":"2024-09-24T13:49:20.834Z","updated_at":"2025-07-02T16:36:57.567Z","avatar_url":"https://github.com/james2doyle.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"Vue Omnibar\n============\n\n\u003e Create modal popups that emulate omnibar, command palette, open anywhere, or other \"search and act\" functions/features\n\n## Demo\n\n![demo of the keyboard action](demo.gif)\n\n## Features\n\n- [x] built-in filtering using [Fuse.js](https://fusejs.io/)\n- [x] custom key combo support\n- [x] listens for `esc` key\n- [x] bring your own styling (basic styles included)\n- [x] arrow key support\n- [x] uses slots for best flexibility\n- [x] \"off-click\" closes the modal\n\n## Installation\n\n```bash\nnpm install vue-omnibar\n```\n\n### Global Usage\n\n```js\nimport Vue from 'vue';\nimport Omnibar from 'vue-omnibar';\n\nVue.component('omnibar', Omnibar);\n```\n\n### In Single File Components\n\n```js\nimport Omnibar from 'vue-omnibar';\n\nexport default {\n  // ...\n  components: {\n    Omnibar,\n  },\n  // ...\n};\n```\n\n## Usage\n\n```vue\n\u003ctemplate\u003e\n  \u003cdiv id=\"app\"\u003e\n    \u003comnibar :data=\"data\" :initial=\"data.slice(0, 4)\"\u003e\n      \u003ch3 slot=\"header\"\u003eCommand Palette\u003c/h3\u003e\n      \u003c!-- the data to show when nothing has been typed --\u003e\n      \u003c!-- if the initial data is empty, nothing is shown --\u003e\n      \u003ctemplate #initial=\"{ initial }\"\u003e\n        \u003cdiv v-for=\"item in initial\" :key=\"item\" class=\"omnibar-search-initial-list\"\u003e\n          \u003ca href=\"#\" @click.prevent=\"handleClick(item)\" v-text=\"item\"\u003e\u003c/a\u003e\n        \u003c/div\u003e\n      \u003c/template\u003e\n      \u003c!-- the filtered results based on the what is being typed --\u003e\n      \u003ctemplate #results=\"{ results }\"\u003e\n        \u003cdiv v-for=\"item in results\" :key=\"item\" class=\"omnibar-search-results-list\"\u003e\n          \u003ca href=\"#\" @click.prevent=\"handleClick(item)\" v-text=\"item\"\u003e\u003c/a\u003e\n        \u003c/div\u003e\n      \u003c/template\u003e\n    \u003c/omnibar\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript lang=\"ts\"\u003e\nimport Vue from 'vue';\nimport Omnibar from '@/omnibar.vue';\n\nexport default Vue.extend({\n  name: 'OmnibarExample',\n  components: {\n    Omnibar\n  },\n  data() {\n    return {\n      data: [\n        '1️⃣ --- one',\n        '2️⃣ --- two',\n        '3️⃣ --- three',\n        '4️⃣ --- four',\n        '5️⃣ --- five',\n        '6️⃣ --- six',\n      ]\n    };\n  },\n  methods: {\n    handleClick(item: any) {\n      window.alert(item);\n    }\n  },\n});\n\u003c/script\u003e\n\n\u003cstyle type=\"text/css\"\u003e\n.omnibar-search-list a {\n  display: inline-block;\n  width: 100%;\n}\n\u003c/style\u003e\n```\n\n## Opening Programmatically\n\n```vue\n\u003c!-- the `openOmnibar` event can be called anyway and will trigger the modal to open --\u003e\n\u003cbutton type=\"button\" @click.prevent=\"$root.$emit('openOmnibar')\"\u003eShow Omnibar\u003c/button\u003e\n\u003c!-- if there is a `name`, the event will have the name appended: `'openOmnibar.myName'` --\u003e\n\u003cbutton type=\"button\" @click.prevent=\"$root.$emit('openOmnibar.myName')\"\u003eShow \"myName\" modal\u003c/button\u003e\n\u003c!-- you can also close the modal with the opposite event: `'closeOmnibar.myName'` --\u003e\n\u003cbutton type=\"button\" @click.prevent=\"$root.$emit('closeOmnibar.myName')\"\u003eClose \"myName\" modal\u003c/button\u003e\n```\n\n## Available Props\n\n- *name*: `string | boolean | null` - namespace the modal and the open event (default: `''`)\n- *data*: `Array\u003cany | Record\u003cstring, any\u003e\u003e` - the data to filter when typing (`required`)\n- *initial*: `Array\u003cany | Record\u003cstring, any\u003e\u003e` - the data to show when the field is empty (default: `[]`)\n- *keybinding*: `Array\u003cstring\u003e | null` - combination of keys that need to be pressed (default: `['shift', 'p']`)\n- *shadow*: `boolean` - add a shadow to the view box (default: `true`)\n- *overlay*: `boolean` - show an overlay under the view box (default: `true`)\n- *options*: `Fuse.IFuseOptions\u003cstring\u003e` - options to pass to Fuse.js ([see options page](https://fusejs.io/api/options.html)) (default: `{}`)\n\n## Development\n\n- `npm run serve`: run a development server with a the `serve.vue` page\n- `npm run build`: generate the build output\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames2doyle%2Fvue-omnibar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjames2doyle%2Fvue-omnibar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames2doyle%2Fvue-omnibar/lists"}