- Android
- iOS
- Web
Drawing Canvas
Display and edit a drawing document.
Engine API DrawingCanvasnayan-ui/drawing
Example.tsx
| Name | Type | Default | Details |
|---|---|---|---|
| active | boolean | Optional | |
| background | string | Optional | |
| document | DocumentSurface<DrawingState> | Required | |
| mode | "components" | "view" | "draw" | "move" | Optional | |
| onChange | ((state: DrawingState) => void) | Optional | |
| onError | ((error: Error) => void) | Optional | |
| style | React.CSSProperties | Optional |
React Native API
| Name | Type | Default | Details |
|---|---|---|---|
| active | boolean | Optional | |
| background | string | Optional | |
| document | DocumentSurface<DrawingState> | Required | |
| mode | "components" | "view" | "draw" | "move" | Optional | |
| onChange | ((state: DrawingState) => void) | Optional | |
| onError | ((error: Error) => void) | Optional | |
| style | ViewStyle | Optional |