New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-proximity-feedback

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-proximity-feedback

change item animation speed based on mouse proximity

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Vue Proximity Feedback

npm npm

Installation

npm install vue-proximity-feedback --save

Usage

  • register the component.

    window.Vue = require('vue')
    
    Vue(ProximityFeedback, require('vue-proximity-feedback'))
    
  • create a css animation

    @keyframes pulse {
        to {
            transform: scale(1.4);
        }
    }
    
    .pulse {
        animation: pulse 0.25s ease infinite alternate;
    }
    
  • usage

    <proximity-feedback
        ref="pfb"
        tag="div"
        animation-class="pulse"
        :distance="{min: 10, max: 400}"
        :divide-by="125"
        @click.native="doSomthing()">
            <i class="fa-search"></i>
    </proximity-feedback>
    
    • you can conditionaly start / stop the mouse tracking through
      this.$refs.pfb.stop()
      this.$refs.pfb.start()
      
    proprequiredtypedefaultdescription
    tag:x:stringspan
    animationClass:white_check_mark:string
    distance:x:object{min: 0, max: 100}
    divideBy:x:number100proximity / divideBy = animation speed

TODO

  • fix frame stutter when animation speed change.

Keywords

FAQs

Package last updated on 20 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc