The Sticky Note node renders a paper-like note on the canvas with a drop shadow, top adhesive strip, bottom-right dog-ear fold flap, an optional author attribution row, and an inline editable label.
Built with Konva shapes and wired into Weave.js’s shared shape-label engine, sticky notes support dragging, live resizing without distorting the fold corner or tape strip, rotation, selection via both the sheet and the fold flap, and double-click text editing (using either the legacy DOM overlay or the native on-canvas rich-text editor).
Features
-
Curated pastel palette: Exports
STICKY_NOTE_PASTEL_COLORSwith 8 colors (Yellow#FEF08A, Mint#A7F3D0, Rose#FECDD3, Lavender#DDD6FE, Sky#BAE6FD, Amber#FDE68A, Coral#FFEDD5, White#F9FAFB). -
3D paper geometry: Main sheet with single ambient drop shadow, top adhesive tape accent, and bottom-right dog-ear folded flap.
-
Shape-label engine: Supports
label*styling props, rich-textlabelBlocks, auto-growing height when text exceeds bounds, and minimum size enforcement viagetNodeMinSize. -
Optional author attribution: Displays an optional
authorfooter preserved as provided without forced casing or prefixes.
Usage
Import the Node
Start by importing the node:
import { WeaveStickyNoteNode } from "@inditextech/weave-sdk";
Register the Node
Then register the node on the Weave class instance.
const instance = new Weave({
...
nodes: [
...,
new WeaveStickyNoteNode(), (1)
]
})
| 1 | Added in this step. |
Use the node
We provide an action named Sticky Note Tool that allows users to add Sticky Note nodes to the canvas.