A sheet to peel
Press a sticker (or Enter) and it lifts off, leaving its kiss-cut outline behind. Press the outline to stick it back. Hover one and its corner curls.
A sheet of die-cut stickers on backing paper, each in its own kiss-cut outline. Press one and it peels away, drag one and it comes off under the mouse; the outline stays behind and can take it back. For reward charts, sticker packs and anything you collect.
npx shadcn@latest add @wobko/sticker-sheetFirst time here? Add the registry to components.json first. How to install
Press a sticker (or Enter) and it lifts off, leaving its kiss-cut outline behind. Press the outline to stick it back. Hover one and its corner curls.
The backing is release paper with a sheen (glassine, the default), kraft or plain paper. Columns and size set the grid; shorthand `stickers` skips the items when you do not need labels or ids.
Peel a sticker off the sheet (click it, or drag it with a mouse and let go over the board) and it lands on the board. Let go anywhere else and it springs back. Delete it on the board and it returns to its outline on the sheet.
The backing paper (a Paper) with its printing: a dashed cut margin, crop marks, an optional typed title with how many stickers are left, and the sheen of release paper. Lays its children out on a grid.
| Prop | Type | Default | Description |
|---|---|---|---|
| stickers | string[] | - | Ids from the art library: one item each, when you need no labels or ids of your own. |
| columns / size | number | 4 / 72 | Stickers per row, and the drawn size of each in px (below 80 the 64 px redraw is used). The grid keeps its column count and each cell is size + 22 px wide, so choose them for your narrowest screen (3 columns of 56 px fit a 320 px phone). |
| title | string | - | Typed at the top of the sheet, with "n left" on the right. Also the group's accessible name. |
| backing | "glassine" | "kraft" | "paper" | "glassine" | Pale blue-gray release paper with a sheen, kraft, or plain paper. |
| peeled / defaultPeeled / onPeeledChange | string[] | - | Ids of the stickers that are off the sheet. Controlled: the parent decides what is peeled. |
| onPeel | (item) => void | - | { id, name, label, dragged, x, y }. For a drag, x and y are the pointer's client position at release: drop the sticker there (boardPoint from sticker-board turns them into canvas coordinates, and says whether the point is on the board at all). A controlled sheet that does not add the id to `peeled` declines the drag: the sticker springs back. A click or a key has no position: put it wherever you like. |
| onStick | (item) => void | - | A peeled sticker was put back on its outline. |
| restorable | boolean | true | Whether pressing an empty outline puts the sticker back. When off, a spent outline is dimmed (aria-disabled) rather than disabled, so the key that just peeled it keeps its focus. |
| disabled / label | boolean / string | - | Freeze the sheet; the name when there is no title (default "Sticker sheet"). |
| stock-like props | PaperProps | - | tilt, tape, fastener, shadow, edge and the rest of Paper. |
One sticker in its outline. A button whose name says what it does now: "Peel Rocket sticker", then "Put Rocket sticker back". It lifts and turns a little on hover, curls its corner, and flies off up and to the right when peeled.
| Prop | Type | Default | Description |
|---|---|---|---|
| name | string | - | The sticker's id in the art library. |
| id | string | - | Its key in the peeled list. Default the name; give each a different id if a name appears twice. |
| label | string | - | What it is called to a reader (default the name in words). |
| size | number | - | Drawn size in px, overriding the sheet's. |
The files the CLI copies into your project.
Loading the source