atlas-paged
v1.0.2
Published
React components for creating print-ready documents with Paged.js, including development preview system
Readme
Atlas Paged

A comprehensive React component library for creating print-ready documents with Paged.js, featuring a built-in development preview system.
Preview Version
https://atlas-paged.vercel.app/
Installation
npm install atlas-pagedPeer Dependencies
npm install pagedjs tailwindcssQuick Start
Paged Layouter Integration
import { Layouter, TwoColumns, PageBreak } from "atlas-paged";
function MyDocument() {
return (
<div>
<div id="pagedjsdocroot" style={{ display: "none" }}>
<TwoColumns>
<p>Your content here...</p>
</TwoColumns>
<PageBreak />
<p>Next page content...</p>
</div>
<div id="preview"></div>
<Layouter />
</div>
);
}Style imports
Setup your project's main/index.css file like the following:
@import "tailwindcss";
@import "atlas-paged/styles";
@source "../node_modules/atlas-paged";Print Style imports
As the Layouter component is referencing the print.css file under /public, it has to be copy pasted into your projects /public folder. Until now I have not found another way.
Available Components
Layout Components
TwoColumns- Two-column layoutThreeColumnsLeft- Three-column layout with emphasis on leftThreeColumnsCenter- Three-column layout with emphasis on centerThreeColumnsRight- Three-column layout with emphasis on right
Typography
H1,H2,H3,H4,H5,H6- Styled headingsP- Paragraph componentA- Link component
Visual Elements
PageBreak- Force page breaksDivider- Visual dividers
Page Components
PageNumeration- Page numberingLayouter- Main layout engine
Development Tools
Navigation- Preview navigationLoremIpsum- Lorem ipsum generatorChapterName- Chapter naming utility
Technologies Used
React, Vite, TypeScript, Paged.js, Tailwind CSS
This is a comprehensive component library for creating print-ready documents with Paged.js and React. It includes Tailwind CSS integration and TypeScript support, making it easy to build complex, print-ready documents with a custom component architecture.
License
MIT © Max Schmalenbach
