Valyro Русская версия

Sticker Board

A free composition of photos, stickers and notes to move and rotate. Free, MIT · Interactive blocks › Canvases, selection and budgets

A free board of photos, stickers and notes. Select an item to drag it, turn it by its handle or by steps, and bring it forward or back; arrow keys and toolbar buttons do the same without a pointer. Coordinates live in the board's own system, so the composition scales with the width. A drag moves only the dragged item in the DOM and reports the new layout once, on release; Escape cancels a gesture, Undo steps back through the confirmed layouts.

Installation

npx valyro-cli@latest add sticker-board
npx shadcn@latest add https://valyro.xyz/r/sticker-board.json
npm install valyro-ui

import 'valyro-ui/styles.css';
import { StickerBoard } from 'valyro-ui';

Props

PropTypeDefault
itemsStickerItem[]The layout: items with centre, size, angle and stacking order in canvas units. Never changed in place.
defaultItemsStickerItem[][]Initial layout when uncontrolled.
onItemsChange(items: StickerItem[], reason: StickerChangeReason) => voidCalled with the proposed layout after a finished move, turn, restack or undo.
canvasSize *BoardSizeThe board's coordinate system. Items keep their place relative to it at any width.
selectedIdstring | nullId of the selected item, or null.
defaultSelectedIdstring | nullnullInitial selectedId when uncontrolled.
onSelectedIdChange(id: string | null) => voidCalled with the new selectedId when it changes.
bounds'contain' | 'partial''contain'contain (default) keeps whole turned items on the board; partial lets edges hang over, the centre stays on.
snapnumber0Grid step in canvas units for moves; 0 (default) turns snapping off.
rotationStepnumber15Degrees per turn of the toolbar buttons; Shift snaps the turn handle to it. Default 15.
readOnlybooleanfalseShows the layout without editing.
labelsPartial<StickerBoardLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

  • Lasso Select — Drag a rectangle to select a group of cards
  • Priority Budget — Share a fixed budget of points between items
  • Feature Hotspots — Numbered points on an image that open a note about each detail
  • Exploded Layers — Prepared image layers pulled apart with captions
  • Prediction Card — The reader guesses first, then sees the answer and the explanation
  • Detail Dial — Choose how deep an explanation goes: short, detailed or full
  • Version Scrubber — Step through prepared versions of a design with one slider
  • Page Minimap — Schematic map of a long page with the visible area
  • Peel Sticker — A sticker you peel back by its corner to reveal what is under it
  • Scratch Reveal — Scratch off a cover to reveal text or a picture
  • Tear-off Ticket — A ticket whose stub tears off along the perforation
  • Split-Flap Board — Mechanical departure board: only the changed characters flip

Previous: Swipe Action Card · Next: Lasso Select · All Interactive blocks