🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@ankipro/react-native-canvas-view

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ankipro/react-native-canvas-view

React Native canvas drawing view for iOS

1.0.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

@ankipro/react-native-canvas-view

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.

Key Features:

  • 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.

canvas demo

Installation

yarn add @ankipro/react-native-canvas-view

... and pods

npx pod-install

Basic usage

import CanvasView from "@ankipro/react-native-canvas-view";

// ...

<CanvasView ref={canvasRef} />

For more information see example.

Props

NameTypeDescription
refCanvasViewRefSee methods below
styleViewStyleBase RN View style
onUndoRedoChange(undoRedo: {canUndo: boolean; canRedo: boolean}) => voidCheck ability undo/redo

Methods

NameTypeDescription
.showToolbar()() => voidShow Toolbar
.hideToolbar()() => voidHide Toolbar
.undo()() => voidReverse the last action
.redo()() => voidReapply previously undone action
.getDrawingBase64()(onComplete: (base64: string) => void) => voidGet Base64 image

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Made with create-react-native-library

Keywords

react-native

FAQs

Package last updated on 11 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts