Socket
Socket
Sign inDemoInstall

@layerhub-io/react-eye-dropper

Package Overview
Dependencies
10
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @layerhub-io/react-eye-dropper

React Eye Dropper component and hook


Version published
Weekly downloads
50
increased by35.14%
Maintainers
2
Install size
5.25 MB
Created
Weekly downloads
 

Readme

Source

React Eye Dropper

React Eye Dropper component for all browsers

Installation

pnpm install @layerhub-io/react-eye-dropper

Usage

Use as hook

import { useEyeDropper } from "@layerhub-io/react-eye-dropper";

function App() {
  const { onInit, color } = useEyeDropper();
  return (
    <div style={{ backgrounColor: color }}>
      <div onClick={onInit}>TRIGGER</div>
    </div>
  );
}

Use as component

import EyeDropper from "@layerhub-io/react-eye-dropper";

function App() {
  const onChange = (c) => {
    console.log({ c });
  };
  return (
    <div style={{ backgrounColor: color }}>
      <EyeDropper onChange={onChange}>
        <div>TRIGGER</div>
      </EyeDropper>
    </div>
  );
}

FAQs

Last updated on 02 Oct 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc