TextInput
A component for displaying text input.Text displays words and characters at various sizes
How to use
import React from 'react';
import {TextInput} from '@gyri/native-ui-components';
const App = ({style, className}) => {
return (
<TextInput className={className} style={style} />
)
}
export default App
Props
| # | Name | Data type | Default value | Values | Description |
|---|---|---|---|---|---|
| 1 | style | object | Custom style object | ||
| 2 | className | string | '' | It defined nativewind style classes. | |
| 3 | mode | 'flat' | 'flat','outlined' | Mode of the TextInput. | |
| 4 | disabled | boolean | false | If true, user won't be able to interact with the component. | |
| 5 | label | The text or component to use for the floating label. | |||
| 6 | placeholder | string | Placeholder for the input. | ||
| 7 | error | boolean | false | Whether to style the TextInput with error style. | |
| 8 | selectionColor | string | Selection color of the input. On iOS, it sets both the selection color and cursor color. On Android, it sets only the selection color. | ||
| 9 | cursorColor | string | Cursor color of the input on Android. This property has no effect on ios. | ||
| 10 | underlineColor | string | Active underline color of the input. | ||
| 11 | activeUnderlineColor | string | Active underline color of the input. | ||
| 12 | outlineColor | string | Inactive outline color of the input. | ||
| 13 | activeOutlineColor | string | Active outline color of the input. | ||
| 14 | textColor | string | Color of the text in the input. | ||
| 15 | multiline | boolean | Whether the input can have multiple lines. | ||
| 16 | numberOfLines | number | The number of lines to show in the input (Android only). | ||
| 17 | value | string | Value of the text input. |
For more details https://callstack.github.io/react-native-paper/docs/components/TextInput/