spotlight-vue
spotlight-vue
Key activable spotlight for Vue.js (initially built for Slidev)

Installation
npm i spotlight-vue
Usage
Import with:
import Spotlight from 'spotlight-vue';
// Also import styles
import 'spotlight-vue/dist/style.css';
Register the plugin:
Vue.use(Spotlight);
Use it in your Vue.js app with:
<spotlight/>
In your app, maintain the Shift key pressed and the spotlight should appear.
Parameters
activationKey(type:string, default:'Shift'): The key to hold down to activate the spotlightactive(type;boolean): Activate manually the spotlightcolor(type:string, default:'black'): CSS color of the spotlight shadowopacity(type:number | string, default:0.75): Opacity of the spotlight shadowsize(type:string, default:100px): Size of the spotlighttransitionDuration(type:string, default:200ms): CSS transition durationsx(type;number): Set manually the spotlight X positiony(type;number): Set manually the spotlight Y position
Events
activate: Fired when component is activateddeactivate: Fired when component is deactivatedupdate: Fired when component is active and position is updated
All three events also send a position object with the following shape:
x(type:number): X position in percentage of the containery(type:number): Y position in percentage of the container
Related Packages
@olzhas-adiyatov/slidev-addon-asciinema
A fork of the slidev addon to embed asciinema casts to presentations. In this fo...
797
0
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.5.1 | ^3.2.31 | MIT | |
| 0.4.5 | ^3.2.31 | GPL | |
| 0.4.4 | ^3.2.27 | GPL | |
| 0.4.3 | ^3.2.27 | GPL | |
| 0.4.2 | ^3.2.27 | GPL | |
| 0.4.1 | ^3.2.27 | GPL | |
| 0.4.0 | ^3.2.27 | GPL | |
| 0.3.0 | ^3.2.27 | GPL | |
| 0.2.2 | ^3.2.27 | GPL | |
| 0.2.1 | ^3.2.27 | GPL | |
| 0.2.0 | ^3.2.27 | GPL | |
| 0.1.0 | ^3.2.27 | GPL | |
| 0.0.1 | ^3.2.27 | GPL |