Digital signatures have now been included in many mobile applications, especially in logistics and legaltech. When developing an app for confirming delivery or signing a contract, efficient capture of the user’s signature is vital.
In this article, we will show you how to develop a responsive signature capture pad that leverages the react-native-signature-canvas library. We will explain how to capture the signature as a Base64-Encoded image string for delivery to your back-end.

Why Use react-native-signature-canvas?
The react-native-signature-canvas library offers an effortless means of obtaining a signature through a WebView-based HTML canvas across both iOS and Android platforms.
Key Features
- Compatibility with multiple platforms (Android & iOS)
- Straightforward and uncomplicated
- Adaptable signature pad
- Output sent in Base64 format
- Ability to clear and save signature
- Simple API with customizable callback handlers
Steps to Implement Digital Signatures in a React Native App:
Step 1: Install Necessary Packages
Install the signature canvas and WebView packages:
npm install react-native-signature-canvas
npm install react-native-webviewor
yarn add react-native-signature-canvas
yarn add react-native-webviewFor iOS:
cd ios
pod installStep 2: Create Signature Component
Create a separate SignaturePad.js component file. The component will include the signature canvas, control buttons, and management of the lifecycle of the resultant data.
import React, { useRef } from 'react';
import { StyleSheet, View, TouchableOpacity, Text } from 'react-native';
import SignatureScreen from 'react-native-signature-canvas';
const SignaturePad = ({ onOK, descriptionText }) => {
const ref = useRef(null);
const handleOK = (signature) => onOK(signature); // Base64 string
const handleClear = () => ref.current.clearSignature();
const handleConfirm = () => ref.current.readSignature();
return (
<View style={styles.container}>
<SignatureScreen
ref={ref}
onOK={handleOK}
descriptionText={descriptionText || "Sign Here"}
/>
<View style={styles.buttonRow}>
<TouchableOpacity
style={styles.button}
onPress={handleClear}>
<Text>Clear</Text>
</TouchableOpacity>
<TouchableOpacity
style={styles.button}
onPress={handleConfirm}>
<Text>Save</Text>
</TouchableOpacity>
</View>
</View>
);
};
const styles = StyleSheet.create(
{
container: { flex: 1 },
buttonRow: { flexDirection: 'row', justifyContent: 'space-around' },
button: { padding: 10 }
});
export default SignaturePad;Step 3: Integrate the Signature and Use it
Import the SignaturePad component in the App.js file. The callback function onOK could be used to get the Base64 image data results. This Base64 image data could then be sent to the backend.
import React, { useState } from 'react';
import { SafeAreaView, Alert } from 'react-native';
import SignaturePad from './SignaturePad';
export default function App() {
const handleSignatureSave = (base64DataUrl) => {
// Send base64DataUrl to backend
Alert.alert("Success", "Signature captured!");
};
return (
<SafeAreaView style={{ flex: 1 }}>
<SignaturePad onOK={handleSignatureSave} />
</SafeAreaView>
);
}Conclusion:
Creating digital signatures in a React Native application is very easy with the react-native-signature-canvas package. The library provides a convenient signature pad for users and returns the signature as Base64 Data to upload it to the backend easily.
The development of a reusable signature component provides an option to implement signature functionality on various screens without compromising the user experience. The process is extremely useful when you are creating logistics, healthcare, finance, enterprise, or any other application that requires easy capturing of handwritten signatures.

FAQ
1. Which library is best for capturing digital signatures in React Native?
One of the most effective libraries that serves this purpose is react-native-signature-canvas because it is very simple to implement, lightweight, has universal compatibility as it works on Android and iOS, and the captured signature is converted into a Base64 image.
2. What format is the captured signature returned in?
The whole value of the signature becomes a Base64 image that can be either saved locally or sent to the backend server.
3. Does react-native-signature-canvas support both Android and iOS?
Yes. You can be sure that this library works on both Android and iOS. In the case of iOS, do not forget to run the pod install command after installing the package.
4. Can I customize the appearance of the signature pad?
Yes. You can customize the title text, pen color, background color, canvas styling, buttons, and other options according to your application’s design.



