rn-verifcode
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

   react-native-suggester

npm downloads npm version

rn-verifcode

React-Native component to input confirmation code for both Android and IOS

  • customizable
  • fast paste SMS-code
  • copy from clipboard
  • reset code

How to use it ?

import * as React from 'react'
import { View, Button } from 'react-native'
import VerifCode from './src'
 
export default class App extends React.Component {
  state = {}
  ref = React.createRef()
  render() {
    return (
      <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
        <VerifCode ref={this.ref} onFulfill={code => alert(code)} />
        <Button title="reset" onPress={() => this.ref.current.reset()} />
      </View>
    )
  }
}

Props

interface Props extends TextInputProps {
  autofocus?: boolean
  numberOfDigits?: number
  onFulfill?(code: string): void
}

/rn-verifcode/

    Package Sidebar

    Install

    npm i rn-verifcode

    Weekly Downloads

    1

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    17.4 kB

    Total Files

    6

    Last publish

    Collaborators

    • xcarpentier