Skip to content
VenusUI
Get started

Sticky Notes

A board of handwritten sticky notes you can drag around; the one you grab comes to the front.

Preview

Installation

npx shadcn@latest add @venusui/sticky-notes

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/sticky-notes.tsx

Usage

The code behind the preview above.

sticky-notes-demo.tsx

import { StickyNotes } from "@/components/ui/sticky-notes"

export default function StickyNotesDemo() {
  return (
    <StickyNotes
      notes={[
        { id: "1", text: "Ship the pricing page by Friday!", color: "yellow", x: 6, y: 10, rotate: -4 },
        { id: "2", text: "Ask Sofie for the new onboarding screens", color: "pink", x: 30, y: 30, rotate: 3 },
        { id: "3", text: "Coffee with Marcus at 3", color: "blue", x: 56, y: 8, rotate: -2 },
        { id: "4", text: "Retro ideas: fewer meetings, more demos", color: "green", x: 70, y: 46, rotate: 5 },
        { id: "5", text: "Book flights for the offsite", color: "yellow", x: 12, y: 56, rotate: 2 },
      ]}
    />
  )
}

API reference

PropTypeDefaultDescription
notesStickyNote[]—Each has id, text, a starting x and y (percent of the board), and optionally color (yellow, pink, blue, green) and rotate (degrees).

All <div> props; className styles the board (4:3).

Requirements

  • React 19 and Tailwind CSS v4.

Customization

  • Positions live in component state. To save a layout, lift the state out and store it.
  • Notes use system handwriting fonts; load a web font and change HANDWRITING for the same look everywhere.

Accessibility

  • Each note is focusable (role="note") and the arrow keys move it; hold Shift for bigger steps.
  • Focusing or grabbing a note brings it to the front.

Troubleshooting

Notes jump when dragged.
The board must keep its relative position and aspect ratio; notes are placed in percent of its size.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.
Loading preview

Analog Clock

Data display

A station clock whose needle waits at twelve; drag the minute hand to set it by hand.

Loading preview

Bookshelf

Interactive

Books on a wooden shelf whose spines lift on hover and pull out when selected, with a matching cover.

Loading preview

Chat Thread

Data display

A messaging conversation that plays out with typing indicators; viewers can send replies too.