Select API

Svelte Select rectangle-selection props, callbacks, and controller access.

Select mounts a background rectangle-selection surface backed by a core RectSelectController.

PropMeaning
callbacksSelectCallbacks — selection start and change events
classNameClass for the marquee element

getSelectObject() returns the underlying RectSelectController.

The marquee element carries data-snapline-type="selection"; its geometry is written imperatively by the controller, so style it with CSS rather than Svelte state. Read the current selection at any time with getSelectedNodes(engine).

Per-node selection behavior (for example toggle-on-shift) is decided by the node’s resolveSelectionMode callback, not by Select.