TL_HANDLE_TYPES
See source codeAll 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 shapevirtual
: A handle that exists between vertices for adding new pointscreate
: 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_TYPESNext
TL_SCRIBBLE_STATES