CanvasState
Provider
Canvas Provider from the Canvas package.
Loading CanvasProvider…
Source code
Waiting for the preview before loading source files · 2 of 2
Properties
Public properties derived from the component’s TypeScript signature.
| Property | Type | Default |
|---|---|---|
childrenRequired | StrictComponentElement<CanvasComponentKind | BaseStrictContentChildKind> | readonly (false | StrictComponentElement<CanvasComponentKind | BaseStrictContentChildKind> | null | undefined)[] | — |
colorOptional | string | — |
dataOptional | CanvasDrawingData | — |
initialDataOptional | CanvasDrawingData | createEmptyCanvasDrawing() |
initialToolOptional | "text" | "ellipse" | "line" | "cursor" | "eraser" | "highlighter" | "pen" | "pan" | "rectangle" | "arrow" | "pen" |
onChangeOptional | ((data: CanvasDrawingData) => void) | — |
onToolChangeOptional | ((tool: CanvasTool) => void) | — |
sizeOptional | number | — |
toolOptional | "text" | "ellipse" | "line" | "cursor" | "eraser" | "highlighter" | "pen" | "pan" | "rectangle" | "arrow" | — |