UNPKG

use-otp-input

Version:

šŸš€ Awesome React Hook for One-time password (OTP) Input

31 lines (19 loc) • 929 B
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)