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.
- Host: GitHub
- URL: https://github.com/ceoshikhar/use-fancy-input
- Owner: ceoshikhar
- License: mit
- Created: 2022-03-11T21:39:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-20T18:51:52.000Z (almost 3 years ago)
- Last Synced: 2025-03-11T15:57:23.152Z (3 months ago)
- Language: TypeScript
- Homepage: https://ceoshikhar.github.io/use-fancy-input
- Size: 4.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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
```