Back to Tldraw

Custom tool (sticker)

apps/examples/src/examples/shapes/tools/custom-tool/README.md

5.2.1311 B
Original Source

A simple custom tool.


Tools are nodes in tldraw's state chart. They are responsible for handling user input.

You can create custom tools by extending the StateNode class and overriding its methods. In this example we make a very simple sticker tool that adds a heart emoji to the canvas when you click.