JSPM

vue-direction

0.1.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • 0
    • Score
      100M100P100Q28603F
    • License MIT

    Direction aware hover in Vue.js

    Package Exports

    • vue-direction

    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-direction) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    vue-direction

    Minified size

    Direction aware hover in Vuejs

    Usage

    Try it on codesandbox

    Installation

    Install the component via npm by running npm i vue-direction or yarn add vue-direction.

    Usage

    Import, register and place the component in your Vue app.

    <template>
      <VueDirection>
        <template slot-scope="{ mouseDirection }">
          <!-- do something with 'mouseDirection' -->
          {{ mouseDirection.x }}
          {{ mouseDirection.y }}
        </template>
      <VueDirection/>
    </template>
    import VueDirection from 'vue-direction'
    
    export default {
      components: {
        VueDirection,
      },
    }

    Dev

    Running dev script requires @vue/cli and @vue/cli-service-global to be installed. Install these globally by running npm i --g @vue/cli @vue/cli-service-global or yarn add global vue/cli @vue/cli-service-global.

    Contributing

    This project is open to and encourages contributions! Feel free to discuss any bug fixes/features in the issues. If you wish to work on this project:

    1. Fork the project
    2. Create your feature branch (git checkout -b new-feature-branch)
    3. Commit your changes (git commit -am 'add new feature')
    4. Push to the branch (git push origin new-feature-branch)
    5. Submit a pull request!