Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

use-clipboard-api

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-clipboard-api

📋useClipboardApi is a React Hook that consumes Web Clipboard API.

  • 0.3.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
59
increased by55.26%
Maintainers
1
Weekly downloads
 
Created
Source

📋 use-clipboard-api

useClipboardApi() is a React Hook that consumes Web Clipboard API.

build version MIT License downloads


Table of Contents

Motivation

Usage

To start using the use-clipboard-api in your project, first install in your project:

yarn add use-clipboard-api or npm install use-clipboard-api

Copy to clipboard:
import useClipboardApi from 'use-clipboard-api';

function App() {
  const [value, copy] = useClipboardApi();

  return (
    <div>
      <button onClick={() => copy('Text to be copied.')}>Copy me!</button>
      <p>Copied value: {value}</p>
    </div>
  );
}

export default App;

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Bugs and Sugestions

Report bugs or do suggestions using the issues.

License

MIT License © helderburato

Keywords

FAQs

Package last updated on 04 Feb 2022

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