
Research
/Security News
DuckDB npm Account Compromised in Continuing Supply Chain Attack
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
react-anticapture
Advanced tools
A lightweight React component that helps prevent users from capturing (copying, selecting, printing, or screenshotting) sensitive information rendered on your website. Perfect for privacy, security, and content protection in React applications.
NPM: react-anticapture
A lightweight React component that helps prevent users from capturing (copying, selecting, or screenshotting) sensitive information rendered on your website.
React Anticapture provides a drop-in <AntiCapture>
component that you can wrap around any part of your React app to strongly discourage or block screen capture, selection, and copying of sensitive content.
It’s designed for scenarios where you want to provide an extra layer of deterrence for confidential UI sections.
pnpm add react-anticapture
# or
npm install react-anticapture
# or
yarn add react-anticapture
Simply import and wrap any sensitive page or component within <AntiCapture>
:
import { AntiCapture } from 'react-anticapture';
function ConfidentialSection() {
return (
<AntiCapture>
<h2>Confidential Information</h2>
<p>
This section contains sensitive information. Copying, selecting, and screenshots are discouraged.
</p>
</AntiCapture>
);
}
You can also combine props to fine-tune the deterrence:
<AntiCapture
screenshotPrevent={true}
clipboardPrevent={true}
devtoolsPrevent={true}
userSelect={false}
>
<SecretStuff />
</AntiCapture>
Prop | Type | Default | Description |
---|---|---|---|
screenshotPrevent | boolean | true | Prevents common screenshot and screen recording keyboard shortcuts (PrintScreen, Cmd+Shift+4, etc). |
userSelect | boolean | true | If true, allows user text selection. Set to false to block selection via CSS. |
targetClick | HTMLElement | null | null | Optional target element for dismissing blur overlay. Defaults to component's internal wrapper. |
clipboardPrevent | boolean | false | If true, prevents clipboard copy/paste actions and context menu inside the component. |
devtoolsPrevent | boolean | false | If true, detects and attempts to prevent developer tools from being open. |
Try it out instantly via Storybook:
Live Demo
MIT
Inspired by modern needs for client-side data privacy and protection.
FAQs
A lightweight React component that helps prevent users from capturing (copying, selecting, printing, or screenshotting) sensitive information rendered on your website. Perfect for privacy, security, and content protection in React applications.
The npm package react-anticapture receives a total of 25 weekly downloads. As such, react-anticapture popularity was classified as not popular.
We found that react-anticapture demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.