<!-- Documentation of the interaction methods of Input as it is not commented in the component itself. -->

### Interaction methods

| method         | description                                       |
| -------------- | ------------------------------------------------- |
| focus          | Focuses the Input                                 |
| blur           | Removes focus from the Input                      |
| clear          | Clears the text in the Input                      |
| isFocused      | Returns `true` or `false` if the Input is focused |
| setNativeProps | Sets props directly on the react native component |
| shake          | Shakes the input for error feedback               |

### Calling methods on Input

Store a reference to the Input in your component by using the ref prop
provided by React
([see docs](https://reactjs.org/docs/refs-and-the-dom.html)):

```js
const input = React.createRef();

<Input
  ref={input}
  ...
/>
```

You can then use the Input methods like this:

```js
input.current.focus();
input.current.blur();
input.current.clear();
input.current.isFocused();
input.current.setNativeProps({ value: 'hello' });
input.current.shake();
```

```SnackPlayer name=RNE Input
import React from 'react';
import { View, Text } from 'react-native';
import { Input, Icon } from '@rneui/themed';

export default () => {

return (
  <>
    <Input
      placeholder='BASIC INPUT'
    />

    <Input
      placeholder='INPUT WITH ICON'
      leftIcon={{ type: 'font-awesome', name: 'chevron-left' }}
    />

    <Input
      placeholder='INPUT WITH CUSTOM ICON'
      leftIcon={
        <Icon
          name='user'
          size={24}
          color='black'
        />
      }
    />


    <Input
      placeholder="Comment"
      leftIcon={{ type: 'font-awesome', name: 'comment' }}
      onChangeText={value => this.setState({ comment: value })}
      />


    <Input
      placeholder='INPUT WITH ERROR MESSAGE'
      errorStyle={{ color: 'red' }}
      errorMessage='ENTER A VALID ERROR HERE'
    />

    <Input placeholder="Password" secureTextEntry={true} />
  </>
);
};
```
