Back to Tldraw

Lasso select tool

apps/examples/src/examples/editor-api/lasso-select-tool/README.md

5.0.1385 B
Original Source

Add a lasso select tool to tldraw.


You can build different types of selection tools in tldraw. This example creates a lasso select tool that lets you freehand draw to select shapes on the canvas. It uses a reactive atom to reactively store the lasso points, and an Overlay to draw the lasso onto the canvas.

Only shapes that are fully enclosed in the lasso will be selected.