MCPcopy Index your code
hub / github.com/Cnilton/react-native-floating-label-input

github.com/Cnilton/react-native-floating-label-input @1.4.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.4.2 ↗ · + Follow
37 symbols 66 edges 15 files 2 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

npm npm npm

About

This is a React-Native TextInput component, containing a floating placeholder, visible even after filled in, that you can freely modify its styles 💅🎉

Instalation

To install just input the following command:

npm i react-native-floating-label-input

or

yarn add react-native-floating-label-input

⚠ Important

  • If you are using version 1.3.5 or higher, follow instructions below.
  • If not, just install:
npm i react-native-reanimated@1.13.2

or

yarn add react-native-reanimated@1.13.2

Version 1.3.5 or higher - react-native-reanimated v2

  • All animations now are using react-native-reanimated v2, as it was officially released recently. Please follow the Software Mansion guide installation for the react-native-reanimated v2: https://docs.swmansion.com/react-native-reanimated/docs/installation

  • OBS.: if during Software Mansion installation guide your project won't build or builds but crashes on start, try removing node_modules folder.

  • OBS. 2: if you don't want to use the new react-native-reanimated v2, do not upgrade to this version, install version 1.3.4 and react-native-reanimated@1.13.2

Version 1.3.4 or lower - react-native-reanimated v1

  • Last stable version of this lib with Software-Mansion react-native-reanimated v1.

Just install by running:

npm i react-native-reanimated@1.13.2

or

yarn add react-native-reanimated@1.13.2

Props

Prop Type Default Description
labelProps TextProps undefined Set props to the label as TextProps
mask string undefined Set a custom mask to your input
maskType 'currency'

'phone'

'date'

'card' | undefined | Set the mask type | | staticLabel | boolean | false | Set this to true if you want the label to be always at a set position. Commonly used with hint for displaying both label and hint for your input. For changing the position of the label with this prop as true, use the customLabelStyles topFocused and leftFocused to adjust the wanted position. | | hint | string | undefined | Hint displayed when label is focused or staticLabel prop is being used | | hintTextColor | string | '#ccc' | Set hint text color | | currency | string | undefined | Set currency on input | | currencyDivider | ','

'.' | ',' | Set currency thousands divider | | maxDecimalPlaces | number | 2 | Set maximum decimal places | | isFocused | boolean | undefined | If you override the onFocus/onBlur props, you must handle this prop as an state variable | | customLabelStyles | Object | leftFocused?: number

leftBlurred?: number

topFocused?: number

topBlurred?: number

fontSizeFocused?: number

fontSizeBlurred?: number

colorFocused?: string

colorBlurred?: string | Custom styles for the floating label | | customShowPasswordImage | image source path | undefined | Set the image source to set your custom show image | | customHidePasswordImage | image source path | undefined | Set the image source to set your custom hide image | | labelStyles | TextStyle | undefined | Set styles to the floating label component | | showPasswordImageStyles | ImageStyle | undefined | Set styles to the default show password component | | showPasswordContainerStyles | ViewStyle | undefined | Set styles to the default show password container component | | containerStyles | ViewStyle | undefined | Set styles to the input container component | | inputStyles | TextStyle | undefined

Extension points exported contracts — how you extend this code

Props (Interface)
(no doc)
src/index.tsx
SetGlobalStyles (Interface)
(no doc)
src/index.tsx
CustomLabelProps (Interface)
(no doc)
src/index.tsx
InputRef (Interface)
(no doc)
src/index.tsx

Core symbols most depended-on inside this repo

focus
called by 2
src/index.tsx
blur
called by 2
src/index.tsx
setFocus
called by 2
src/index.tsx
setBlur
called by 2
src/index.tsx
_toggleVisibility
called by 2
src/index.tsx
getReactNativeHost
called by 1
android/app/src/main/java/com/react_native_floating_label_input/MainApplication.java
initializeFlipper
called by 1
android/app/src/main/java/com/react_native_floating_label_input/MainApplication.java
animateFocus
called by 1
src/index.tsx

Shape

Function 16
Method 14
Interface 4
Class 3

Languages

TypeScript59%
Java41%

Modules by API surface

src/index.tsx19 symbols
android/app/src/main/java/com/react_native_floating_label_input/MainApplication.java8 symbols
android/app/src/debug/java/com/react_native_rating/ReactNativeFlipper.java5 symbols
src/utils.tsx3 symbols
android/app/src/main/java/com/react_native_floating_label_input/MainActivity.java2 symbols

For agents

$ claude mcp add react-native-floating-label-input \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact