Gesture Pad
Draw a shape to run a command. When it's sure, your stroke morphs into the shape it understood; when it isn't, it offers its two best guesses.
Needs: None. Recognition runs in the page.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| commands | { gesture: string; label: string }[] | required | Which gesture runs what. Only these show as chips. |
| templates | { name: string; points: [number, number][] }[] | – | Shapes it knows. Defaults to circle, check, x, triangle, caret and zigzag; several templates can share a name. |
| onGesture | (command: GestureCommand, score: number) => void | – | Called when a command runs, with the recogniser's score. |
| accent | string | "#2f6fed" | Colour of a recognised stroke and of what it learned. The default lightens in dark mode. |
| height | number | 300 | Height of the drawing area, px. |
| className | string | – | Class on the wrapper. |
| style | CSSProperties | – | Style on the wrapper, e.g. --mlui-radius. |