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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@codsod/react-native-otp-input

v1.0.2

Published

A customizable OTP input component for React Native with TypeScript support, enabling seamless user authentication with flexible input handling and cross-platform compatibility.

Downloads

226

Readme

@codsod/react-native-otp-input

A customizable OTP input component for React Native, designed to simplify user authentication through one-time passwords. This package offers an intuitive interface and flexible functionality, making it ideal for mobile applications.

Features

  • Easy-to-Use API: Quickly integrate OTP input functionality into your applications.
  • Customizable Length: Specify the number of input fields for your OTP.
  • Cross-Platform Support: Optimized for both iOS and Android devices, as well as desktop web.
  • Seamless Focus Management: Automatically shifts focus between input fields, enhancing user experience.
  • TypeScript Support: Fully typed for better development experience and error checking.

Installation

To install the package, use npm or yarn:

npm install @codsod/react-native-otp-input

Complete Example:

import React, { View } from "react";
import OTPInput from "@codsod/react-native-otp-input";

const Home = () => {
  const [otp, setOTP] = useState("");

  return (
    <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
      <OTPInput length={6} onOtpComplete={(txt: string) => setOTP(txt)} />
    </View>
  );
};

export default Home;

Props

| Prop | Type | Description | Default | | --------------- | ---------- | ------------------------------------------------------------------------- | ------- | | length | number | The number of input fields for the OTP. | 4 | | onOtpComplete | Function | Callback fired when the OTP input is complete, receiving the entered OTP. | - | | style | style | Custom styles for the OTP container. | - | | inputStyle | style | Custom styles for each input field. | - |

Key Changes and Improvements

  1. Title and Description: Adjusted the title and description to focus on OTP input functionality instead of chat interfaces.

  2. Features Section: Clearly listed relevant features that are specific to OTP input, highlighting usability and flexibility.

  3. Installation and Usage: Improved the example code for clarity and usability. Included more context in the example for better understanding.

  4. Props Table: Corrected the descriptions of props to accurately reflect their purposes.

  5. Contribution and License Sections: Added these sections to encourage community engagement and clarify the licensing.

Conclusion

Feel free to modify any sections further to better align with your branding or preferences. This README should provide a solid foundation for users to understand and utilize your OTP input component effectively! If you have any more requests or need further assistance, let me know!