TL_HANDLE_TYPES

See source code

All available handle types used by shapes in the tldraw editor.

Handles are interactive control points on shapes that allow users to modify the shape's geometry. Different handle types serve different purposes:

  • vertex: A control point that defines a vertex of the shape
  • virtual: A handle that exists between vertices for adding new points
  • create: A handle for creating new geometry (like extending a line)
  • clone: A handle for duplicating or cloning shape elements
TL_HANDLE_TYPES: Set<'clone' | 'create' | 'vertex' | 'virtual'>

Example

// Check if a handle type is valid
if (TL_HANDLE_TYPES.has('vertex')) {
  console.log('Valid handle type')
}

// Get all available handle types
const allHandleTypes = Array.from(TL_HANDLE_TYPES)
Prev
TL_CURSOR_TYPES
Next
TL_SCRIBBLE_STATES