English | [简体中文](./README.zh-CN.md)

# use-otp-input

[![NPM version](https://img.shields.io/npm/v/use-otp-input?color=a1b858&label=)](https://www.npmjs.com/package/use-otp-input)

🚀 Awesome React Hook for One-time password (OTP) Input

[Live Demo](https://use-otp-input.vercel.app)

## Features

- 🦄 Input more intuitive, just like [plain input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input), including paste text
- ✨ Support `Backspace` and `Delete` keys, even shortcut with `Ctrl` key
- 🎈 Support move caret by `ArrowLeft` and `ArrowRight` keys

## Build & Publish

- `npm run build`
- `npx changeset`
- `npx changeset version`
- `git commit`
- `npx changeset publish`
- `git push --follow-tags`

> [`changeset` prerelease doc](https://github.com/changesets/changesets/blob/main/docs/prereleases.md)

## License

[MIT](./LICENSE) License © 2023 [Yuns](https://github.com/yunsii)
