Paperjoy is a Claude Code skill that turns one line of text into a paper pop-up book: a single HTML file that opens, turns its pages and has something to touch on every one. You type “a pop-up book of Naples, with Vesuvius and the bay” and Claude saves an .html file in the folder you are working in, ready to open with a double click. Claude does not write drawing code. It describes the scene in a JSON file, meaning what rises from the page, what is painted and what you can touch, and a fixed WebGL2 engine draws it. Before delivery a validator opens and closes the book and tests every fold as it would work on real paper. If a piece sticks out of the closed book or hits another one, it says which and by how many millimetres. The code is open source, under the MIT licence.
Browse the eight example books · Code on GitHub
Why is the scene a JSON file and not code?
If the model also wrote the code that draws, every book would be a new program to check. With the scene in JSON, Claude keeps the choice of what goes on the page, and the geometry is handled by an engine that always behaves the same way. That is what lets the validator measure every fold: it works on data with a fixed format, not on free-form code.
What mechanisms are there?
Six, taken from real pop-up books.
| Mechanism | What it does |
|---|---|
| Facade | a fold parallel to the spine: buildings, bridges, rows of houses |
| Steps | nested folds that descend toward the reader: terraces, staircases |
| Tower | a V fold on the spine: bell towers, lighthouses, the Mole |
| Tab | pulled from the edge, something crosses the page |
| Flap | lifts to show what is underneath or inside |
| Wheel | turns and changes the scene: the hour, the season, day and night |
What is in the eight example books?
Rome, Venice, Florence, Genoa, Turin, Paris, London and Tokyo. In Rome the arena of the Colosseum lifts off and a Vespa passes in front of Trevi. In Genoa a ship enters the port under the Lanterna. In Florence you look inside the dome of the Duomo. In Tokyo, Shibuya lights up at night. They are examples: for another place you change the description, not the code. It works for cities, villages, hotels, shops and events. The book comes out as a full page or as a block to paste into an existing page, which takes the width of its container.
How do you install it?
You need Claude Code and Node.js. From the Terminal:
git clone https://github.com/paolobortolotti/paperjoy ~/.claude/skills/popup-carta
Then restart Claude Code, which reads skills at startup, and ask for a book in words or with /popup-carta. Without git, download the zip from the repository and move the folder to ~/.claude/skills/popup-carta. To update: git -C ~/.claude/skills/popup-carta pull.
What happens on your computer?
Everything is plain text, with no dependencies to install. Nothing runs at installation. The books run in the browser, with engine and fonts inside the file: no external requests and no tracking. The code is under the MIT licence, the Bebas Neue and DM Sans fonts under the SIL Open Font License 1.1. The books you create are yours.