Getting Started with vue-quick-actions
Welcome to our Quick-Action Library, a powerful and efficient tool that brings command-driven control to your applications. Inspired by Spotlight and Raycast, our library offers users the ability to execute tasks with simple and fast commands, revolutionizing the way they interact with your application.
Installation
Install vue-quick-actions
using your preferred package manager:
bash
npm install vue-quick-actions
Usage
Import the vue-quick-actions in your Vue component:
js
import { VueQuickActions } from 'vue-quick-actions';
add style file:
js
import "vue-quick-actions/dist/style.css"
Define the array containing the items listed in the quick actions menu:
js
import { Item } from 'vue-quick-actions';
const items: Item[] = [
{
key: 'console-write', // Key should be unique
label: "Log 'hey' to console",
onSelect() {
console.log('hey');
}
}
]
And in the template:
html
<VueQuickActions :items="items" />
And thats it! You should now have a working quick actions menu. Try ⌘ + K
to open it!