New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-character-input

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-character-input

Interactive character inputs that allow custom masking

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

react-native-character-input

platforms npm npm github issues github closed issues

Getting started

$ npm install react-native-character-input --save

Import

import CharacterInput from 'react-native-character-input'

Usage

<CharacterInput
	placeHolder='YYYY/MM/DD'
	showCharBinary='1111011011'
	handleChange={(value) => setValue(value)}
	inputType='underlined'
	keyboardType='numeric'
/>

<CharacterInput
	placeHolder='YYYY/MM/DD'
	showCharBinary='1111011011'
	handleChange={(value) => setValue(value)}
	inputType='outlined'
	keyboardType='numeric'
/>

<CharacterInput
	placeHolder='YYYY/MM/DD'
	showCharBinary='1111011011'
	handleChange={(value) => setValue(value)}
	inputType='contained'
	keyboardType='numeric'
/>

Available Props

NameTypeRequired?Description
placeHolderstringyesString of place holder characters.
showCharBinarystringyesString of 1 or 0, indicates if corresponding character should be editable or not
handleChangefunction(value: string) => voidyesReturns a string of modifiable characters (1) stripped of disabled characters (0).
keyboardTypestringnoSame as TextInput component from react-native
inputTypestringnoDefault underlined, Options include: underlined, outlined, and contained
permanentTextStyleStyleSheetnoStyles Text component of disabled characters
containerStyleStyleSheetnoContained style of each character input
inputStyleStyleSheetnoInput style of each character input
inputContainerStyleStyleSheetnoInput container style of each character input
placeHolderTextColorStyleSheetnoPlace holder text color
autoFocusbooleannoauto focus on first character input

Features to come

  • handleChange function will return both stripped and raw input values(both modifiable and disabled characters).
  • Allow masked character inputs.
    • Will implement a way to specify an object of keys to REGEX values.
    • This will allow you to specify a mask string of keys/permanent characters. Permanent characters are not mapped as keys and keys have an associated REGEX as its rule to change the character input value.
    • This one will take me a while :)

Keywords

react-native

FAQs

Package last updated on 11 Dec 2020

Did you know?

Socket

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.

Install

Related posts