react-anticapture
Version:
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.
46 lines (41 loc) • 1.37 kB
TypeScript
import { FC } from 'react';
import { PropsWithChildren } from 'react';
/**
* A React component that wraps your application content to provide full-page anti-capture protection.
* It uses the `useAntiCapture` hook internally to manage blur, alerts, and event listeners.
*/
declare const FullPage: FC<PropsWithChildren<FullPageProps>>;
export default FullPage;
/**
* Props for the FullPage component.
* Extends the UseAntiCaptureProps to allow passing hook configurations directly.
*/
declare interface FullPageProps extends UseAntiCaptureProps {
}
/**
* Interface for the props of the useAntiCapture hook.
*/
declare interface UseAntiCaptureProps {
/**
* An optional HTMLElement to attach click listeners for dismissing blur.
* Defaults to the component's internal wrapper if not provided.
*/
targetClick?: HTMLElement | null;
/**
* If true, prevents clipboard copy/paste actions and context menu.
*/
clipboardPrevent?: boolean;
/**
* If true, detects and prevents developer tools from being open.
*/
devtoolsPrevent?: boolean;
/**
* If true, prevents common screenshot and screen recording keyboard shortcuts.
*/
screenshotPrevent?: boolean;
/**
* If true, turn on user-select css
*/
userSelect?: boolean;
}
export { }