TL_SCRIBBLE_STATES

See source code

All available scribble states used by the tldraw drawing system.

Scribble states represent the different phases of a drawing stroke:

  • starting: The scribble is being initiated - paused: The scribble is temporarily paused - active: The scribble is actively being drawn - complete: The scribble is done being drawn but not yet fading - stopping: The scribble is being finished

These states help manage the drawing lifecycle and apply appropriate visual effects during different phases of the stroke.

TL_SCRIBBLE_STATES: Set<
  "active" | "complete" | "paused" | "starting" | "stopping"
>;

Example

// Check if a scribble state is valid
if (TL_SCRIBBLE_STATES.has("active")) {
  console.log("Valid scribble state");
}

// Get all available scribble states
const allStates = Array.from(TL_SCRIBBLE_STATES);
Prev
TL_HANDLE_TYPES
Next
TLDOCUMENT_ID