1.1.4 • Published 5 months ago

react-native-reusableinputwithpaper v1.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

CustomInput Component

A customizable text input component for React Native using react-native-paper. Supports password fields, icons, error handling, and more.

Installation

Ensure you have react-native-paper installed in your project: npm install react-native-paper

Then install the package: npm install react-native-customtextinput

Usage

import React, { useState } from 'react';

import { View } from 'react-native';

import CustomInput from 'react-native-reusableinputwithpaper';

const MyComponent = () => { const text, setText = useState('');

const isPasswordVisible, setIsPasswordVisible = useState(false);

return ( <CustomInput name={text} label="Password" isPassword isPasswordVisible={isPasswordVisible} togglePasswordVisibility={() => setIsPasswordVisible(!isPasswordVisible)} onChangeText={setText} /> ); };

export default MyComponent;

Props

PropertyTypeDescription
namestringInput field value
labelstringPlaceholder label text
styleanyCustom style for the input field
leftIconImageSourcePropTypeLeft-side icon
rightIconanyRight-side icon
mode'flat' | 'outlined'Input field mode (flat or outlined)
ErrorbooleanShows error state
errorTextstringError message
setName(text: string) => voidCallback function to set the input value
setError(hasError: boolean) => voidCallback function to set error state
maxLengthnumberMax characters allowed in input
keyboardTypeKeyboardTypeOptionsKeyboard type for the input field
onChangeText(text: string) => voidHandles text changes in the input
onFocus() => voidCallback function when the input gains focus
onBlur() => voidCallback function when the input loses focus
isPasswordbooleanIf true, hides input text for password fields
isPasswordVisiblebooleanControls the visibility of the password text
togglePasswordVisibility() => voidToggles password visibility when pressed
abort-controlleracceptsacornanseransi-regexansi-stylesanymatchargparseasapast-typesasync-limiterbabel-corebabel-jestbabel-plugin-istanbulbabel-plugin-jest-hoistbabel-plugin-polyfill-corejs2babel-plugin-polyfill-corejs3babel-plugin-polyfill-regeneratorbabel-plugin-syntax-hermes-parserbabel-plugin-transform-flow-enumsbabel-preset-current-node-syntaxbabel-preset-jestbalanced-matchbase64-jsbrace-expansionbracesbrowserslistbserbuffer-fromcaller-callsitecaller-pathcallsitescamelcasecaniuse-litechalkchrome-launcherchromium-edge-launcherci-infocliuiclone-deepcolorcolor-convertcolor-namecolor-stringcommandercommondirconcat-mapconnectconvert-source-mapcore-js-compatcosmiconfigcross-spawncsstypedebugdeepmergedepddestroyee-firstelectron-to-chromiumemoji-regexencodeurlerror-exerror-stack-parserescaladeescape-htmlescape-string-regexpesprimaesutilsetagevent-target-shimexecaexponential-backofffast-json-stable-stringifyfb-watchmanfill-rangefinalhandlerfind-cache-dirfind-upflow-enums-runtimeflow-parserfreshfs.realpathfseventsfunction-bindgensyncget-caller-fileget-package-typeget-streamglobglobalsgraceful-fshas-flaghasownhermes-estreehermes-parserhoist-non-react-staticshttp-errorshuman-signalsimage-sizeimport-freshimurmurhashinflightinheritsinvariantis-arrayishis-core-moduleis-directoryis-dockeris-fullwidth-code-pointis-numberis-plain-objectis-streamis-wslisexeisobjectistanbul-lib-coverageistanbul-lib-instrumentjest-environment-nodejest-get-typejest-haste-mapjest-message-utiljest-mockjest-regex-utiljest-utiljest-validatejest-workerjs-tokensjs-yamljsc-androidjsc-safe-urljscodeshiftjsescjson-parse-better-errorsjson5kind-oflevenlighthouse-loggerlocate-pathlodash.debouncelodash.throttleloose-envifylru-cachemake-dirmakeerrormarkymemoize-onemerge-streammetrometro-babel-transformermetro-cachemetro-cache-keymetro-configmetro-coremetro-file-mapmetro-minify-tersermetro-resolvermetro-runtimemetro-source-mapmetro-symbolicatemetro-transform-pluginsmetro-transform-workermicromatchmimemime-dbmime-typesmimic-fnminimatchminimistmkdirpmsnegotiatorneo-asyncnode-dirnode-fetchnode-forgenode-int64node-releasesnormalize-pathnpm-run-pathnullthrowsob1object-assignon-finishedonceonetimeopenp-limitp-locatep-tryparse-jsonparseurlpath-existspath-is-absolutepath-keypath-parsepicocolorspicomatchpifypiratespkg-dirpretty-formatpromiseprop-typesqueuerange-parserreactreact-devtools-corereact-isreact-nativereact-native-paperreact-native-reusableinputwithpaperreact-native-safe-area-contextreact-native-vector-iconsreact-refreshreadlinerecastregenerateregenerate-unicode-propertiesregenerator-runtimeregenerator-transformregexpu-coreregjsgenregjsparserrequire-directoryresolveresolve-fromrimrafschedulerselfsignedsemversendserialize-errorserve-staticsetprototypeofshallow-cloneshebang-commandshebang-regexshell-quotesignal-exitsimple-swizzleslashsource-mapsource-map-supportsprintf-jsstack-utilsstackframestacktrace-parserstatusesstring-widthstrip-ansistrip-final-newlinesupports-colorsupports-preserve-symlinks-flagtemptersertest-excludethroattmplto-regex-rangetoidentifiertr46tslibtype-detecttype-festundici-typesunicode-canonical-property-names-ecmascriptunicode-match-property-ecmascriptunicode-match-property-value-ecmascriptunicode-property-aliases-ecmascriptunpipeupdate-browserslist-dbuse-latest-callbackutils-mergevlqwalkerwebidl-conversionswhatwg-fetchwhatwg-urlwhichwrap-ansiwrappywrite-file-atomicwsy18nyallistyargsyargs-parser
1.1.4

5 months ago

1.1.3

5 months ago

1.1.2

5 months ago

1.1.1

5 months ago

1.1.0

5 months ago

1.0.9

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago