Back to Tldraw

Drag and drop tray

apps/examples/src/examples/ui/drag-and-drop-tray/README.md

5.2.2416 B
Original Source

Create a drag and drop tray to create shapes on the canvas.


This example shows how to create a drag and drop tray with items that can be dragged onto the canvas to create shapes.

The tray is positioned as a fixed UI element using the InFrontOfTheCanvas component, and includes interactive items that can be dragged to create shapes on the canvas. The interaction can be cancelled by pressing the Escape key.