npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-pinpad

v0.1.4

Published

react-native-pinpad is a customizable React Native component for secure PIN input, designed for authentication and transaction verification. It supports styling options, haptic feedback, and optional masking for enhanced security

Readme

📌 react-native-pinpad

react-native-pinpad is a customizable React Native PIN pad component for secure PIN input, designed for authentication and transaction verification.
It supports styling options and optional masking for enhanced security.

✨ Features

  • 🔢 Customizable PIN pad UI
  • 🎭 Optional masking for PIN security
  • 🎨 Supports custom styles and themes
  • ⌨️ Callback functions for handling input
  • 🗑️ Customizable delete button

📦 Installation

yarn add react-native-pinpad

or

npm install react-native-pinpad

🚀 Usage Example

To use react-native-pinpad in your app, follow this example:

import React, { useState } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import Pinpad from 'react-native-pinpad';

const App = () => {
  const [pin, setPin] = useState('');

  const handleItemClick = (value) => {
    setPin((prev) => (prev.length < 6 ? prev + value : prev));
  };

  const handleDelete = () => {
    setPin((prev) => prev.slice(0, -1));
  };

  return (
    <View style={styles.container}>
      <Text style={styles.title}>Enter PIN:</Text>
      <Text style={styles.pinDisplay}>{'*'.repeat(pin.length)}</Text>
      <Pinpad onItemClick={handleItemClick} onDeleteItem={handleDelete} />
    </View>
  );
};

const styles = StyleSheet.create({
  container: { flex: 1, justifyContent: 'center', alignItems: 'center' },
  title: { fontSize: 20, fontWeight: 'bold', marginBottom: 10 },
  pinDisplay: { fontSize: 24, letterSpacing: 8, marginBottom: 20 },
});

export default App;

PinPad Demo

🔧 Props & API Reference

| Prop | Type | Description | |-----------------|---------------|----------------| | onItemClick | Function | Called when a number is clicked. Passes the clicked value. | | onDeleteItem | Function | Called when delete (X) is clicked. Useful for handling backspace in PIN entry. | | onItemKeyClick | Function | Called with metadata about the key press (insert/delete, action ID, etc.). | | disableHaptic | boolean | Disables haptic feedback when true. Default: false. | | buttonStyle | StyleProp | Custom styling for number buttons. | | textStyle | StyleProp | Custom styling for text inside the buttons. | | deleteIcon | ReactElement | Custom delete button component. Default: X icon. |

⚡ Customizing the PIN Pad

<Pinpad 
  buttonStyle={{ backgroundColor: 'lightblue' }} 
  textStyle={{ color: 'white', fontSize: 24 }} 
/>

🔹 Custom Delete Icon

import { MaterialIcons } from '@expo/vector-icons';

<Pinpad deleteIcon={<MaterialIcons name="backspace" size={24} color="red" />} />

🛠️ Contributing

We welcome contributions!

To get started:

git clone https://github.com/brightakin/react-native-pinpad.git
cd react-native-pinpad
yarn install

⭐ Support the Project

If you find this package useful, star the repo on GitHub! 🌟