1.0.5-alpha.1-3 • Published 11 months ago

react-eye v1.0.5-alpha.1-3

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

react-eye

About

Eye Component follows mouse.

Usage

npm:

npm i react-eye

yarn:

yarn add react-eye

Getting started with react-eye

Here is an example of a basic app with Eye component:

import * as React from "react";
import Eye from "react-eye";

function App() {
return (
    <>
      <Eye
        white={{
          x: 150,
          y: 150,
        }}
        iris={{
          x: 100,
          y: 100,
          color: "chocolate",
        }}
      />
    </>
  )
}

props

nametypedescription
white{ x: number; y: number; }configuration for white part of eye, x is for vertical, y is for horizontal size
iris{ x: number; y: number; color?: string; }configuration for iris. x is for vertical, y is for horizontal size, color for iris fill
controlerRefReact.MutableRefObject<{ watch: (targetPosition: { x: number; y: number }) => void; }>ref reception for controler, for now only "watch" will back.that make focus for target position specified
throttleIntervalnumberspecify throttle interval for mouse trace

also "style" and "className" are available for styling!

Contributing

Thanks so much for your interest! Any suggestion and pull requests are welcome!!

License

MIT

1.0.5-alpha.1-3

11 months ago

1.0.5-alpha.1-2

1 year ago

1.0.5-alpha.1

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago