Component packs › Jigsaw › Piece Upload
Every dropped file becomes a printed piece that turns, flies to the next free gap and snaps into the tray.
Piece Upload is a file upload from Jigsaw, a component pack with 6 puzzle controls: Upload, progress, tabs and forms made of jigsaw pieces that cut, drop and lock together. Price: $2 for the whole pack.
Built with: real jigsaw cuts per gap, spring snap, drop where you let go.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
cols | number | 3 × 2 | Gaps in the tray (columns × rows). Default 3 × 2. |
rows | number | ||
accept | string | Passed to the file input, e.g. "image/*,.pdf". | |
dark | boolean | follows the page | Force the dark (true) or light (false) look. Default: follows the page. |
onFiles | (files: File[]) => void | ||
autoplay | number | false | Showcase mode: adds a sample file every N ms while visible. |
readonly files: File[]add(files: File[]): voidremove(index: number): voidclear(): voiddestroy(): voidimport PieceUpload from './PieceUpload';
<PieceUpload />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: File upload.