TextField adds a label, helper text, error state, and editability controls to React Native TextInput.
Usage
Props
All React Native
TextInputProps are accepted. A supplied editable value takes precedence over isDisabled and isReadOnly.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Render a labeled native text input with validation feedback
TextField adds a label, helper text, error state, and editability controls to React Native TextInput.
import { useState } from 'react';
import { TextField } from '@amisi-mobile-starter/ui';
export const EmailField = () => {
const [email, setEmail] = useState('');
return (
<TextField
label="Email"
value={email}
onChangeText={setEmail}
helperText="We will never share your email."
keyboardType="email-address"
autoCapitalize="none"
/>
);
};
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | undefined | Field label. |
error | string | undefined | Error shown instead of helper text. |
helperText | string | undefined | Supporting text shown when there is no error. |
isDisabled | boolean | undefined | Disables editing and applies disabled opacity. |
isReadOnly | boolean | undefined | Disables editing. |
isRequired | boolean | undefined | Accepted by the public type; it does not currently change rendering. |
editable | boolean | !(isDisabled || isReadOnly) | Native override for editability. |
TextInputProps are accepted. A supplied editable value takes precedence over isDisabled and isReadOnly.Was this page helpful?