0.0.14 • Published 7 months ago

@gluestack-ui/pin-input v0.0.14

Weekly downloads
-
License
-
Repository
github
Last release
7 months ago

@gluestack-style/pin-input

Installation

To use @gluestack-ui/pin-input, all you need to do is install the @gluestack-ui/pin-input package:

$ yarn add @gluestack-ui/pin-input

# or

$ npm i @gluestack-ui/pin-input

Usage

The PinInput component is specifically designed for capturing One-Time Passwords (OTPs) in a user-friendly and secure manner. It's perfect for implementing OTP verification in your application, ensuring a smooth user experience. Here's an example of how to use this package to create an OTP input field:

import { View, TextInput } from 'react-native';
import { createPinInput } from '@gluestack-ui/pin-input';
const PinInputRoot = createPinInput({
  Root: View,
  Input: TextInput,
});

Customizing the pin-input:

Default styling of all these components can be found in the components/core/pin-input file. For reference, you can view the source code of the styled pin-input components.

import { View, TextInput } from 'react-native';

// import the createPinInput function
import { createPinInput } from '@gluestack-ui/pin-input';

// Understanding the API
const PinInputField = createPinInput({
  Root: View,
  Input: TextInput,
});

// Using the pin-input component
export default () => (
  <PinInputField>
    <PinInputFieldInput />
  </PinInputField>
);

More guides on how to get started are available here.

0.0.14

7 months ago

0.0.13

8 months ago

0.0.12

8 months ago

0.0.11

8 months ago

0.0.10

8 months ago

0.0.9

8 months ago

0.0.8

9 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago