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

Readme

About
Eye Component follows mouse.
Usage
npm:
npm i react-eyeyarn:
yarn add react-eyeGetting 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
|name|type|description| |-|-|-| |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| |controlerRef|React.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| |throttleInterval|number|specify 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!!
