Back to Tldraw

Prevent multi-shape selection

apps/examples/src/examples/events/prevent-multi-shape-selection/README.md

5.0.0314 B
Original Source

This example demonstrates how to prevent users from selecting multiple shapes at once in tldraw.


You can prevent multiple shape selection by registering a before-change handler for the instance_page_state type. This handler intercepts selection changes and ensures only one shape can be selected at a time.