
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@paprika/copy-input
Advanced tools
The CopyInput component is an input with a button that copies the input's contents to user's clipboard.
The CopyInput component is an input with a button that copies the input's contents to user's clipboard.
yarn add @paprika/copy-input
or with npm:
npm install @paprika/copy-input
| Prop | Type | required | default | Description |
|---|---|---|---|---|
| alterCopiedText | func | false | null | Called after the button is clicked, and the copied value is passed in |
| children | node | false | null | Used for CopyInput.Input |
| clickedText | string | false | null | The text to show in the tooltip when the user presses the "copy" button |
| hoverText | string | false | null | The text to show in the tooltip when the user hovers over the "copy" button |
| isReadOnly | bool | false | true | Is the input read-only. |
| hasInputContainer | bool | false | true | If the value will be rendered in an Input component or hidden |
| hasValueContainer | bool | false | false | If a plain text version of the value will be rendered |
| value | string | false | "" | Default value for the input |
Uncontrolled:
import CopyInput from "@paprika/copy-input";
return <CopyInput value="Copy me" />;
Controlled with props for the internal Input
import CopyInput from "@paprika/copy-input";
const [controlledValue, setControlledValue] = React.useState("Copy me");
return (
<CopyInput>
<CopyInput.Input value={controlledValue} onChange={e => setControlledValue(e.target.value)} />
</CopyInput>
);
FAQs
The CopyInput component is an input with a button that copies the input's contents to user's clipboard.
The npm package @paprika/copy-input receives a total of 33 weekly downloads. As such, @paprika/copy-input popularity was classified as not popular.
We found that @paprika/copy-input demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.