1.0.1 • Published 4 years ago

r-copy-image-clipboard v1.0.1

Weekly downloads
58
License
MIT
Repository
-
Last release
4 years ago

Created with :heart: by Luan Eduardo da Costa | luan1346@gmail.com


:page_with_curl: About

This library helps you to copy JPG and PNG images to clipboard easily. Can be used with React, Vue, Angular and other web frameworks.

:white_check_mark: Installation

  • Using yarn
yarn add copy-image-clipboard
  • Using npm
npm i copy-image-clipboard

:zap: Usage

// Import the copy function
import copyImg from 'copy-image-clipboard'

// Use the image src attribute here
copyImg('imageSrc')

See the demo folder for a more detailed example with React.

:globe_with_meridians: Compatibility

  • Created and tested using Chrome 84.0

This project uses the asynchronous Clipboard API and the Fetch API. Use the links below to see the browser compatibility:

:blue_book: License

This project is under the MIT license. See the LICENSE for more information.