@useprint/components
v0.1.3
Published
[docs](https://useprint.dev/docs/packages/components)
Readme
@useprint/components
React primitives for building printable documents.
Install
npm install @useprint/componentsGetting started
import { Body, Document, Head, Page } from '@useprint/components';
export default function Invoice() {
return (
<Document pageSize="A4">
<Head>
<title>Invoice</title>
</Head>
<Body>
<Page style={{ padding: 48 }}>
<h1>Invoice</h1>
<p>Author this as React, render it later as HTML.</p>
</Page>
</Body>
</Document>
);
}Included primitives
DocumentHeadBodyPageNewPageUnbreakable
Re-exports
This package also re-exports:
@useprint/render@useprint/tailwind
That makes @useprint/components a convenient starting point when you want the main document primitives and the HTML rendering helpers in one place.
