Skip to main content

TextInput.Icon

Add-on component for text input.

How to use

import React from 'react';
import {TextInput} from '@gyri/native-ui-components';

const App = ({style, className}) => {
const [text, setText] = React.useState('');

return (
<TextInput
label="Password"
secureTextEntry
right={<TextInput.Icon icon="eye" style={style} className={className} />}
/>
);
}
export default App

Props

#NameData typeDefault valueValuesDescription
1styleobjectCustom style object
2classNamestring''It defined nativewind style classes.
3iconIcon to show.
4colorColor of the icon or a function receiving a boolean indicating whether the TextInput is focused and returning the color.
5rippleColorColor of the ripple effect.

For more details https://callstack.github.io/react-native-paper/docs/components/TextInput/TextInputIcon