
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
@agartha/react-native-confirmation-code-input
Advanced tools
A react-native component to input confirmation code for both Android and IOS
A react-native confirmation code input for both IOS and Android
npm install react-native-confirmation-code-input --save
Import this module:
import CodeInput from 'react-native-confirmation-code-input';
Use as a component and style it:
render() {
return (
<CodeInput
ref="codeInputRef1"
secureTextEntry
className={'border-b'}
space={5}
size={30}
inputPosition='left'
onFulfill={(code) => this._onFulfill(code)}
/>
<CodeInput
ref="codeInputRef2"
secureTextEntry
compareWithCode='AsDW2'
activeColor='rgba(49, 180, 4, 1)'
inactiveColor='rgba(49, 180, 4, 1.3)'
autoFocus={false}
ignoreCase={true}
inputPosition='center'
size={50}
onFulfill={(isValid) => this._onFinishCheckingCode1(isValid)}
containerStyle={{ marginTop: 30 }}
codeInputStyle={{ borderWidth: 1.5 }}
/>
<CodeInput
ref="codeInputRef2"
keyboardType="numeric"
codeLength={5}
className='border-circle'
compareWithCode='12345'
autoFocus={false}
codeInputStyle={{ fontWeight: '800' }}
onFulfill={(isValid, code) => this._onFinishCheckingCode2(isValid, code)}
/>
)
}
This component uses the same props as . Below are additional props for this component:
Prop | Type | Default | Description |
---|---|---|---|
codeLength | number | 5 | length of confirmation code -> number of cells |
compareWithCode | string | code to compare. if null, onFulfill callback return inputted code to check later | |
inputPosition | string | center | position of code input in its container: left , right , center , full-width |
size | number | 40 | size of input cells |
space | number | 8 | space between 2 cells |
className | string | border-box | Some built-in classname: border-box , border-circle , border-b , border-b-t , border-l-r |
cellBorderWidth | number | 1.0 | width of cell borders |
activeColor | string | rgba(255, 255, 255, 1) | color of cells when active |
inactiveColor | string | rgba(255, 255, 255, 0.2) | color of cells when inactive |
ignoreCase | boolean | false | ignore case when checking code |
autoFocus | boolean | true | auto focus on code input |
codeInputStyle | style object | custom style for code input | |
containerStyle | style object | custom style for code input container | |
onFulfill | function | callback function called when fulfilling code. If compareWithCode is null -> return (code) in callback, else return (isValid, code) . Required |
clear input:
this.refs.refName.clear();
...
<CodeInput
...
ref="refName"
/>
See EXAMPLE
git clone https://github.com/ttdung11t2/react-native-confirmation-code-input.git
cd react-native-confirmation-code-input/example
npm install
react-native run-ios / react-native run-android
react-native-confirmation-code-input is released under the MIT license. See LICENSE for details.
Any question or support will welcome.
FAQs
A react-native component to input confirmation code for both Android and IOS
The npm package @agartha/react-native-confirmation-code-input receives a total of 1 weekly downloads. As such, @agartha/react-native-confirmation-code-input popularity was classified as not popular.
We found that @agartha/react-native-confirmation-code-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.