- Home
- Skills
- Frontend & Web Apps
- React A4 Drag & Drop Editor
More screenshots
Works with the AI Agents you already use
React A4 Drag & Drop Editor
Build a drag-and-drop A4 editor (CV/resume builder) in React with react-grid-layout v2, Tiptap and print-to-PDF.
$4.99
React A4 Drag & Drop Editor
Example session with this skill installed
In a Vite + React + TypeScript project, build the core of an A4 CV builder: the grid geometry module, the data model, and a Sheet component using react-grid-layout with free-form block dragging. Text blocks only for now. Include the print CSS so it exports a single A4 page to PDF.
- Read your context and instructions
- Compiled the react a4 drag
- Generated the app files
I've built the geometry module, the data model and a Sheet component with free-form dragging, plus the print CSS. npx tsc -b, npx oxlint and vite build all pass with no errors. Tested in the browser: drag with snap, resize from all 8 handles, double-click editing and a single-page A4 print preview all work.
What's in each file (all under src/)
model/grid.tsholds every measurement: A4 in mm and px, 24×48 cells, and the px size of a cell. Cells are rectangular (about 1:√2) so the grid fills the sheet exactly.model/types.tsandmodel/defaults.tshold theSheetItemandGridRecttypes and the default text-block size, with positions stored in cells.model/placement.tshas pure helpers:isFree,findFreeSpotandgrowHeight.lib/freeDrag.tsis the pixel-level drag. It moves the block withtransformand snaps to a cell on release. If the target cell is taken, the block goes to the nearest free spot.components/Sheet.tsxconfigures react-grid-layout 2.3.0 as a fixed-width, free-placement grid with no overlaps. RGL's own dragging is off, and all eight resize handles are on. It also does selection and delete, and it's the only place that converts betweenSheetItemand the RGL layout.components/TextBlock.tsxis a text block with three states: idle, selected, and editing (double-click to edit, Esc to leave).App.tsx,App.css,sheet.cssandindex.csshold the "Add text" button, the "Export PDF" button (also Ctrl/Cmd+P) and the sheet styling.sheet.csshas the print CSS.- Unused Vite template files in
src/were removed.
Print CSS
@page { size: A4; margin: 0 }. In print the sheet is a fixed 210×297 mm with overflow: clip, and the toolbar, delete button, resize handles, selection outline and grid lines are hidden.
Decisions and gaps
- Plain
contentEditablefor text instead of Tiptap, since only text blocks were requested and Tiptap isn't installed. The rich-text toolbar and auto-height are not built yet, butminHandgrowHeightare ready for them. - Drop-from-sidebar isn't built. Blocks are added by clicking "Add text", which puts them in the first free spot.
- Fonts aren't self-hosted yet, so the PDF uses the system font.
Next steps
Add Tiptap with the three-state text block and auto-height, a sidebar with drag-to-drop, image/line/icon blocks, and self-hosted fonts via @fontsource.
Sheet.tsx
ZIP · project files
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Distilled from a working CV builder. Gives your agent a tested workflow and the non-obvious fixes for react-grid-layout v2 (fixed-width free placement, no compaction), pixel-level block dragging with snap on release, Tiptap text blocks with auto-height, mm-accurate A4 grid geometry and print CSS that avoids a blank second page. Includes 6 reference files and a symptom → cause → fix table.
Tested in Claude Code and Gemini CLI. Requires React 18+, react-grid-layout 2.x, @tiptap/react 3.x. No scripts, no network access.
Requires react-grid-layout v2. Native screenshot protection is impossible; only deterrents like watermarks or blurs can be implemented.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 14 days ago
Requires
Permissions
File Scopes
Instruction-only skill, no bundled scripts. The agent may run `npm install` for react-grid-layout and @tiptap/react, and `npx tsc -b` for type checking. No credentials or external accounts needed.