CharlesStover / Use Clippy
Licence: mit
React Hook for reading from and writing to the user's clipboard.
Stars: ✭ 139
Programming Languages
javascript
184084 projects - #8 most used programming language
typescript
32286 projects
Projects that are alternatives of or similar to Use Clippy
Use Force Update
React Hook to force your functional component to update.
Stars: ✭ 142 (+2.16%)
Mutual labels: npm, travis-ci, travis
Fetch Suspense
A React hook compatible with React 16.6's Suspense component.
Stars: ✭ 479 (+244.6%)
Mutual labels: npm, travis-ci, travis
Reactn
React, but with built-in global state management.
Stars: ✭ 1,906 (+1271.22%)
Mutual labels: npm, travis-ci, travis
Use React Router
React Hook for pub-sub behavior using React Router.
Stars: ✭ 575 (+313.67%)
Mutual labels: npm, travis-ci, travis
Quicksort Js
An implementation of Quicksort in JavaScript/TypeScript.
Stars: ✭ 60 (-56.83%)
Mutual labels: npm, travis-ci, travis
react-innertext
Returns the innerText of a React JSX object.
Stars: ✭ 37 (-73.38%)
Mutual labels: travis-ci, travis
Inlineattachment
Easily paste and upload files/images in plain textareas
Stars: ✭ 597 (+329.5%)
Mutual labels: npm, clipboard
Trytravis
Send local git changes to Travis CI without commits or pushes.
Stars: ✭ 131 (-5.76%)
Mutual labels: travis-ci, travis
googletest-ci
Continuous integration (CI) + Google Test (gtest) + CMake example boilerplate demo
Stars: ✭ 14 (-89.93%)
Mutual labels: travis-ci, travis
Condition Travis
🚫 semantic-release plugin to check Travis CI environment before publishing.
Stars: ✭ 9 (-93.53%)
Mutual labels: travis-ci, travis
Automatic Release
Automates the release process for GitHub projects.
Stars: ✭ 46 (-66.91%)
Mutual labels: npm, travis
todo-list
TodoList using Ionic2/3 & Firebase: * PWA * SSO Google plus. * Share list via QRcode. * Upload image from Camera or Storage. * Speech Recognition.
Stars: ✭ 18 (-87.05%)
Mutual labels: travis-ci, travis
react-multi-context
Manage multiple React 16 contexts with a single component.
Stars: ✭ 19 (-86.33%)
Mutual labels: travis-ci, travis
Node Developer Boilerplate
🍭 Boilerplate for ES6+ Node.js and npm Developer
Stars: ✭ 82 (-41.01%)
Mutual labels: npm, travis-ci
Angular Library Starter Kit
Angular 5 Library Starter Kit based on Angular-CLI
Stars: ✭ 35 (-74.82%)
Mutual labels: npm, travis-ci
Generator Rn Toolbox
The React Native Generator to bootstrap your apps
Stars: ✭ 1,155 (+730.94%)
Mutual labels: travis-ci, travis
badge-matrix
More advanced badges for projects using Travis or Sauce Labs
Stars: ✭ 77 (-44.6%)
Mutual labels: travis-ci, travis
useClippy
is a TypeScript-friendly React hook for reading from and writing to
the user's clipboard.
Not to be confused with Microsoft Office's assistant, Clippy. 📎
Demo
You can see
use-clippy
in action via GitHub Pages,
which hosts the
demo
directory.
Install
-
npm install use-clippy
or yarn add use-clippy
Use
useClippy()
returns a tuple analogous to useState
, where the first item is
the clipboard contents and the second item is a function for setting the
clipboard contents.
import React from 'react';
import useClippy from 'use-clippy';
export default function MyComponent() {
// clipboard is the contents of the user's clipboard.
// setClipboard('new value') wil set the contents of the user's clipboard.
const [clipboard, setClipboard] = useClippy();
return (
<div>
{/* Button that demonstrates reading the clipboard. */}
<button
onClick={() => {
alert(`Your clipboard contains: ${clipboard}`);
}}
>
Read my clipboard
</button>
{/* Button that demonstrates writing to the clipboard. */}
<button
onClick={() => {
setClipboard(`Random number: ${Math.random()}`);
}}
>
Copy something new
</button>
</div>
);
}
Sponsor 💗
If you are a fan of this project, you may become a sponsor via GitHub's Sponsors Program.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].