Sticker Field
ComponentsSticker Field
ExperimentsNew

Sticker Field

A freeform collage you can pull apart, throw around, and make your own.

React + CSS
Drag to arrange. Or use arrow keys to move, Shift and arrows for larger steps, left and right brackets to rotate, and Home to restore this sticker.
Live component. Go ahead, interact.
01

Installation

Run this in your shadcn-configured React project. The component and stylesheet are added together.

TERMINAL
npx shadcn@latest add http://localhost:5173/r/sticker-field.json

This command uses the current site address. For localhost, keep this preview running on the same computer. Files follow your configured components alias.

02

Usage

Import the component and make the details your own.

TypeScript
import { StickerField } from '@/components/anticraft/StickerField';

export function Example() {
  return (
    <StickerField
      items={[
        {
          id: 'sun', label: 'Orange sun', x: 0.28, y: 0.4, rotation: -12,
          content: <span style={{ display: 'grid', placeItems: 'center', width: '100%', height: '100%', background: '#e45534', color: '#fff', borderRadius: '50%', fontSize: 70 }}>✳</span>,
        },
        {
          id: 'note', label: 'Make something good note', x: 0.68, y: 0.6, rotation: 8,
          content: <span style={{ display: 'grid', placeItems: 'center', width: '100%', height: '100%', background: '#e3f491', color: '#24251f', fontSize: 24, textAlign: 'center' }}>Make<br />something<br />good.</span>,
        },
      ]}
    >
      <p style={{ textAlign: 'center', padding: '6rem 1rem' }}>Move things. Change the picture.</p>
    </StickerField>
  );
}
03

Props

PropTypeDefaultDescription
itemsStickerFieldItem[]RequiredStickers with unique id, accessible label, decorative ReactNode content, x/y center coordinates from 0 to 1, and optional rotation, width, and height in pixels.
childrenReactNode—The content or artwork behind the movable stickers.
inertiabooleantrueLets a sticker glide briefly after release. Automatically disabled for reduced motion.
resetKeynumberundefinedChange this value to restore every sticker to its supplied position and rotation.
onChange(positions: StickerFieldPosition[]) => voidundefinedReceives serializable id, x, y, and rotation values after a drag, glide, or keyboard move settles.
classNamestring''Additional classes for the field. Keep sticker content decorative, without nested controls.
04

Motion & accessibility

Considered by default.

Drag with a mouse, pen, or touch. Focus a sticker and use arrow keys to move it, Shift for larger steps, [ and ] to rotate, or Home to reset it. Stickers stay within the field. Reduced motion removes the release glide and decorative drag tilt.

Use semantic content and meaningful labels in your composition. Check contrast and keyboard behavior with your own styles and content.

05

Inspiration

The playful act of moving stickers off a portrait inspired this freeform collage. Anticraft uses original artwork and an independent React implementation, with keyboard movement, bounded dragging, and optional release momentum.

Visit Studio Alphonse — About

The component source and demo artwork are original to Anticraft UI. The linked site is the design or content reference.