0.3.6 • Published 3 years ago

chakra-otp-input v0.3.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

chakra-otp-input

One Time Password Component Package for Chakra UI

Codesandbox Link Here

NPM Link Here

Install

npm i chakra-otp-input

Usage

Basic Usage

import { Flex, FormControl, ChakraProvider, theme } from "@chakra-ui/react";
import * as React from "react";
import { OTPInput } from "chakra-otp-input";

export default function App() {
  const handleOTPInput = (value) => {
    console.log(value);
  };

  return (
    <ChakraProvider theme={theme}>
      <Flex pt="48" justify="center" align="center" w="full">
        <FormControl w="60">
          <OTPInput noInputs={6} onChange={handleOTPInput} />
        </FormControl>
      </Flex>
    </ChakraProvider>
  );
}

API

Running project

  • Clone this repository
git clone https://github.com/Buupu/chakra-otp-input.git
  • Install all dependencies
npm i
  • Install package example dependencies
cd example
npm i
  • Start the package server, and the example server
# root directory
npm start

# example directory
npm run dev
0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.0

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.3

3 years ago

0.2.0

3 years ago

0.2.7

3 years ago

0.1.8

3 years ago

0.2.6

3 years ago

0.1.7

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.1.9

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago