1.0.0 • Published 3 years ago

vue3-spotlight v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

vue-spotlight

Vue spotlight allows you to spawn MacOS spotlight search inspired UI element controllable with keyboard.

Currently only vue v3 is supported.

Vue-spotlight

Requirements

  • vue3

Instalation

Run npm install vue3-spotlight

In your main app entry file add:

import VueSpotlight from "vue-spotlight";

// app initialization code
// const app = createApp()

app.use(VueSpotlight);

// app run code

Props

NameDescriptionTypeDefault
itemsList items to renderSpotlightItem[][]
open-keyKeys to press to open spotlightstring[]'Meta', 'Shift'
close-keyKeys to press to close spotlightstring[]'Escape'

SpotlightItem API

SpotlightItem is the core controller to say how your items should be rendered. | Name | Description | Type | | | | --------- | -------------------------------- | --------------- | ----------------- | --- | | name | List item title | string | | | | description | List item description | string | | | | onSelect | Function to run when item is selected | () => void | | |

Contributing

Refer to Contributing.md