Skip to content

gwenaelp/vue-command-palette

Repository files navigation

vue-command-palette

Rollup badge Jest Vue Storybook Commitizen semantic-release Npm badge Build Status

A simple command palette component

Generated using vue-cli-template-library.

Installation

npm install vue-command-palette

vue-command-palette can be used as a module in both CommonJS and ES modular environments.

When in non-modular environment, vue-command-palette will register all the components to vue by itself.

ES6

//
// You can register a component manually
//
import { HelloWorld } from 'vue-command-palette';

export default {
  ...
  components: {
    HelloWorld
  },
  ...
};

//
// or register the whole module with vue
//
import ModuleLibrary from 'vue-command-palette';

// Install this library
Vue.use(ModuleLibrary);

CommonJS

//
// You can register a component manually
//
var Vue = require('vue');
var ModuleLibrary = require('vue-command-palette');

var YourComponent = Vue.extend({
  ...
  components: {
    'hello-world': ModuleLibrary.HelloWorld
  },
  ...
});

//
// or register the whole module with vue
//
var Vue = require('vue');
var ModuleLibrary = require('vue-command-palette');

// Install this library
Vue.use(ModuleLibrary);

Browser

<script src="path/to/vue/vue.min.js"></script>
<script src="path/to/vue-command-palette/dist/vue-command-palette.min.js"></script>
<!-- Components are registered globally -->

After that, you can use it in your templates:

<hello-world></hello-world>

Changelog

See the GitHub release history.

Contributing

See CONTRIBUTING.md.

About

A simple command palette component for vue

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published