id | title |
---|---|
input |
Input |
import Icon from 'react-native-vector-icons/FontAwesome';
import { Input } from 'react-native-elements';
<Input
placeholder='BASIC INPUT'
/>
<Input
placeholder='INPUT WITH ICON'
leftIcon={
<Icon
name='user'
size={24}
color='black'
/>
}
/>
<Input
placeholder='INPUT WITH SHAKING EFFECT'
shake={true}
/>
<Input
placeholder='INPUT WITH ERROR MESSAGE'
errorStyle={{ color: 'red' }}
errorMessage='ENTER A VALID ERROR HERE'
/>
This component inherits all native TextInput props that come with a standard React Native TextInput element, along with the following:
containerStyle
inputContainerStyle
errorMessage
errorStyle
inputStyle
label
labelStyle
leftIcon
leftIconContainerStyle
rightIcon
rightIconContainerStyle
shake
styling for view containing the label, the input and the error message
Type | Default |
---|---|
View style (object) | none |
styling for Input Component Container (optional)
Type | Default |
---|---|
View style (object) | none |
adds error message (optional)
Type | Default |
---|---|
string | none |
add styling to error message (optional)
Type | Default |
---|---|
object | none |
style that will be passed to the style
props of the React Native TextInput
(optional)
Type | Default |
---|---|
object | none |
add a label on top of the input (optional)
Type | Default |
---|---|
string | none |
styling for the label (optional)
Type | Default |
---|---|
object | none |
displays an icon to the left (optional)
Type | Default |
---|---|
React Native Component | none |
styling for left Icon Component container
Type | Default |
---|---|
View style (object) | none |
displays an icon to the right (optional)
Type | Default |
---|---|
React Native Component | none |
styling for right Icon Component container
Type | Default |
---|---|
View style (object) | none |
add shaking effect to input component (optional)
Type | Default |
---|---|
any | none |
Input with a label and an error message | Styles explanation |
---|---|