1.0.3 • Published 3 years ago

epic-floating-input-react-native v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

npm npm npm runs with expo

An elegant, fast & animated floating input component for react native


Features

  • 60FPS smooth animation. 🔥
  • Dark mode supported.
  • Standalone usage. ✌️
  • Compatible Expo.👌
  • Runs smoothly on Both Android & IOS
  • Written in TypeScript. ✨

Installation

yarn add epic-floating-input-react-native
# or
npm install epic-floating-input-react-native

Also, you need to install react-native-vector-icons, and follow their installation instructions.

Usage

import * as React from "react";

import { StyleProp, Text, View, ViewStyle } from "react-native";
import { EpicFloatingInput } from "epic-floating-input-react-native";

export default function App() {

  const container: StyleProp<ViewStyle> = {
    flex: 1,
    justifyContent: "center",
    paddingHorizontal: 20,
  };

  return (
    <View style={container}>
	  // Just a Single Line Startup 🌟
      <EpicFloatingInput placeholder="Epic Floating Input" />
      //End
    </View>
  );
}

Props

namedescriptionrequiredtypedefault
typeFloating Input Theme ['primary','danger', 'warning', 'success', 'muted', 'tertiary'].No
themeFrom this you can override the current theme of the input.No[primary: #hexCode ,danger: #hexCode, warning: #hexCode, success: #hexCode, muted: #hexCode, 'tertiary']
inputStyleinputStyle applied on the input container.NOStyleProp
placeholderplaceholder text for the input.Yesstring
modespecify the current mode dark, light.NOdark or light
leftyou can add icon to the left side of the inputNOIconPropsundefined
rightyou can add icon to the right side of the inputNOIconPropsundefined
optionsmore options for customizing the things.NOEpicFloatingInputOptions
helperTextAdd helper text at the bottom of the input.NOstring or React.ReactNode
disabledDisable the input.NObooleanfalse
onChangeTextCallback on typing.NO(text: string) => void

More Props

You can access all other react native TextInput props as well.

Styles

Epic Floating Input has two type of styles outline and solid.

Outline Style

Solid Style

Author

  • Abdullah Khan
  • Saif Ali Khan

License

MIT

Liked the Component? 😇