JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q49561F
  • License MIT

Hotspot component for Vue.js.

Package Exports

  • vue-hotspot

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-hotspot) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Vue-Hotspot

Hotspot component for Vue.js.

Depends on Vue.js v2+.

Installation

$ npm install vue-hotspot --save

Usage

ES Modules with npm (Recommended)

import Vue from 'vue'
import VueHotspot from 'vue-hotspot' // refers to components/VueHotspot.vue in webpack

Global variable

Without any module system, the component is exposed as window.VueHotspot.

// register component to use
Vue.component('v-hotspot', VueHotspot)

Using the component

<template>
  <v-hotspot :initOptions="hotspotConfig"/>
</template>

<script>
import Vue from 'vue'
import VueHotspot from 'vue-hotspot'
export default {
  components: {
    'v-hotspot': VueHotspot
  },
  data () {
    return {
      hotspotConfig: {
        image: 'your-image-url.png',
        editable: true,
        interactivity: 'hover'
      }
    }
  }
}
</script>

See Live Demo here.

Local development

$ npm i
$ npm run serve

Open http://localhost:8080/ to see the demo.