百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-native-confirmation-code-field

> 前端框架
开源

一个与 iOS、Android 和 Web 兼容的 react-native 确认码字段

1.2K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个与 iOS、Android 和 Web 兼容的 react-native 确认码字段

react-native-confirmation-code-field

A simple react-native confirmation code field compatible with iOS, Android.

Links

  • Documentation
  • Example app
  • Live Expo app

Component features:

  • Simple and tiny 3.8 KB. Easy to use;

  • React Compiler compatible;

  • Clearing part of the code by clicking on the cell;

  • Support "fast paste SMS-code" on iOS & Web. And custom code paste for Android;

  • ⚡ TextInput ref support;

  • Highly customizable. Can be used as masked TextInput;

  • Readable changelog.

Screenshots

Install

yarn add react-native-confirmation-code-field
# ^^^ React 19 required!
# if you want to use it with React 18, use version 8.x.x

How it works

I use an invisible component that will be stretched over components.

JSX structure looks like that:

// Root view (rectangle with a red border on 3d visualization below)

  // Each Cell element is result of a `renderCell` function (gray boxes)
  1
  2
  3
  |
  
  
  // Invisible Text Input with absolute position (gray rectangle with text '123')
  

It needs to solve next problems:

  • When user pastes code from SMS on iOS issue#25
  • Better UX when user types fast, or system sluggish, characters might lost when component switching focus between ``.

Basic example

I took a minimal implementation approach. It mean that this component provides low-level functionality so you can create incredible UI without tears . I recommend you start with creating your own wrapper where you apply all styles and basic configuration.

You can use a ready-made solution out of the box:

  • Animated variant
  • Formatting example
  • Underline variant
  • Show & Hide password
  • Mask variant
…

Compatibility

For [email protected] and below use yarn add react-native-confirmation-code-field@6, otherwise use the latest version yarn add react-native-confirmation-code-field

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptandroidcode-verificationiosone-time-password

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架