1.0.5 • Published 6 years ago

mezrmouse v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Measure distance between your mouse and object to make an interactive user interface

Examples

Demo

Install

npm install --save mezrmouse

Usage

import React, { Component } from 'react'

import Measure from 'mezrmouse'

class Example extends Component {
  render () {
    return (
      <Measure distance={100} onCloseUp={(distance) => this.distance = distance}>
        <button>Click me</button>
      </Measure>
    )
  }
}

Properties

PropertyTypeRequiredDefault valueDescription
distancenumberyesThe distance the mouse will be from the node so onCloseUp (func) will trigger
onCloseUpfuncnoTriggered when the mouse is close to the node - retunes distance by percentages

License

Mezrmouse is freely distributable under the terms of the MIT license.

1.0.5

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago