Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tsdraw.com/llms.txt

Use this file to discover all available pages before exploring further.

Shapes have four style axes: color, size, dash, and fill.

Color

Use palette keys or any CSS color: black, grey, blue, orange, green, red, white, etc.
editor.setDrawStyle({ color: '#ff00ff' })

Size

KeyWidth
s2px
m3.5px
l5px
xl10px

Dash

draw (freehand), solid, dashed, dotted.

Fill

none, semi (translucent), solid, blank (hit-test only).

Usage

editor.setDrawStyle({
  color: 'blue',
  size: 'l',
  dash: 'solid',
})