React Native library for drawing on iOS, leveraging the power of Apple PencilKit to provide a seamless and immersive canvas drawing experience. Ideal for applications that require precise and natural drawing capabilities.
Versatile Drawing Tools
: Choose from a variety of drawing tools, including brushes, pencils, erasers, and more.Customizable Brushes
: Customizable brush sizes, colors, and styles.Undo/Redo Functionality
Save
: Save your masterpieces in Base64 format.
yarn add @ankipro/react-native-canvas-view
... and pods
npx pod-install
import CanvasView from "@ankipro/react-native-canvas-view";
// ...
<CanvasView ref={canvasRef} />
For more information see example.
Name | Type | Description |
---|---|---|
ref | CanvasViewRef | See methods below |
style | ViewStyle | Base RN View style |
onUndoRedoChange | (undoRedo: {canUndo: boolean; canRedo: boolean}) => void | Check ability undo/redo |
Name | Type | Description |
---|---|---|
.showToolbar() | () => void | Show Toolbar |
.hideToolbar() | () => void | Hide Toolbar |
.undo() | () => void | Reverse the last action |
.redo() | () => void | Reapply previously undone action |
.getDrawingBase64() | (onComplete: (base64: string) => void) => void | Get Base64 image |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library