react-to-print
- Version 3.0.2
- Published
- 38.1 kB
- No dependencies
- MIT license
Install
npm i react-to-print
yarn add react-to-print
pnpm add react-to-print
Overview
Print React components in the browser
Index
Functions
function useReactToPrint
useReactToPrint: (options: UseReactToPrintOptions) => UseReactToPrintFn;
Interfaces
interface UseReactToPrintOptions
interface UseReactToPrintOptions {}
property bodyClass
bodyClass?: string;
property contentRef
contentRef?: RefObject<Element | Text>;
property copyShadowRoots
copyShadowRoots?: boolean;
property documentTitle
documentTitle?: string;
property fonts
fonts?: Font[];
property ignoreGlobalStyles
ignoreGlobalStyles?: boolean;
property nonce
nonce?: string;
property onAfterPrint
onAfterPrint?: () => void;
property onBeforePrint
onBeforePrint?: () => Promise<void>;
property onPrintError
onPrintError?: (errorLocation: 'onBeforePrint' | 'print', error: Error) => void;
property pageStyle
pageStyle?: string;
property preserveAfterPrint
preserveAfterPrint?: boolean;
property print
print?: (target: HTMLIFrameElement) => Promise<any>;
property suppressErrors
suppressErrors?: boolean;
Type Aliases
type UseReactToPrintFn
type UseReactToPrintFn = (content?: UseReactToPrintHookContent) => void;
Package Files (4)
Dependencies (0)
No dependencies.
Dev Dependencies (23)
Peer Dependencies (1)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-to-print
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/react-to-print)
- HTML<a href="https://www.jsdocs.io/package/react-to-print"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2045 ms. - Missing or incorrect documentation? Open an issue for this package.