An open API service indexing awesome lists of open source software.

https://github.com/ceoshikhar/use-fancy-input

React hook for building fancy input for things like OTP, 2FA Code, etc.
https://github.com/ceoshikhar/use-fancy-input

Last synced: 2 months ago
JSON representation

React hook for building fancy input for things like OTP, 2FA Code, etc.

Awesome Lists containing this project

README

        

# use-fancy-input

> ⚠️ Not yet 1.0. Many things are subject to change. Documentation is a work in progress. Try it out and give feedback!

React hook for building fancy input for things like OTP, 2FA Code, etc.

Checkout the [Storybook](https://ceoshikhar.github.io/use-fancy-input) for examples.

## Demo

#### Source code behind the GIF above

```tsx
import { useFancyInput } from "use-fancy-input";

const MyComponent = () => {
const { containerRef, inputs } = useFancyInput({ length: 5 });

return (

{inputs.map((input) => {
return ;
})}

);
};
```

# Installation

```bash
npm install use-fancy-input
```

**OR**

```bash
yarn add use-fancy-input
```