Skip to content

react-styless/pin-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-styless/pin-input

Simple pin input component for React without style.

Installation

// with npm
$ npm install @react-styless/pin-input --save

Usage

This is the basic usage of pin-input

import PinInput from '@react-styless/pin-input';
const App = () => {
  const handleComplete = (value: string) => {
    console.log(value);
  }
  return (
    <PinInput onComplete={handleComplete}>
      <input type="text" />
      <input type="text" />
      <input type="text" />
      <input type="text" />
    </PinInput>
  );
}
Attribute Type Description
children ReactElement[]
onComplete (v: string) => void