Type alias TextInputProps

TextInputProps: {
    autoCapitalize?: "characters" | "words" | "sentences" | "none";
    autoCorrect?: boolean;
    componentProps?: ReactTextInputProps;
    decrementNumberText?: string;
    disabled?: boolean;
    getErrorText?: ((value) => string);
    helperText?: string;
    incrementNumberText?: string;
    isInvalid?: ((value) => boolean);
    label?: string;
    labelBreakMode?: TextBreakModes;
    labelLink?: LinkProps;
    light?: boolean;
    maxLength?: number;
    numberRules?: {
        max?: number;
        min?: number;
    };
    onBlur?: ((event) => void);
    onChangeText: ((value) => void);
    onFocus?: ((event) => void);
    onSubmitEditing?: (() => void);
    placeholder?: string;
    required?: boolean;
    secureTextEntry?: boolean;
    style?: StyleProp<ViewStyle>;
    textAreaMinHeight?: number;
    togglePasswordText?: string;
    value: string;
    warningText?: string;
}

Shared props for Text, Password and TextArea

Type declaration

  • Optional autoCapitalize?: "characters" | "words" | "sentences" | "none"

    Define auto cap rule (default is normally sentences)

  • Optional autoCorrect?: boolean

    Indicate if autoCorrect should be used (default is true)

  • Optional componentProps?: ReactTextInputProps

    Direct props to set on the React Native component (including iOS and Android specific props). Helpful for fully customizing text input behavior.

  • Optional decrementNumberText?: string

    Remarks

    number only. Text to use for decrement number button (accessibility). Defaults to ENGLISH "Decrement"

  • Optional disabled?: boolean

    Indicate if disabled

  • Optional getErrorText?: ((value) => string)
      • (value): string
      • Error string to use. Set custom rules or return required text

        Parameters

        • value: string

        Returns string

  • Optional helperText?: string

    Helper string to use

  • Optional incrementNumberText?: string

    Remarks

    number only. Text to use for increment number button (accessibility). Defaults to ENGLISH "Increment"

  • Optional isInvalid?: ((value) => boolean)
      • (value): boolean
      • Check is invalid

        Parameters

        • value: string

        Returns boolean

  • Optional label?: string

    Label string to use

  • Optional labelBreakMode?: TextBreakModes

    Label break mode

  • Optional labelLink?: LinkProps

    Link to render to right of label

  • Optional light?: boolean

    Indicate if text box is used on layer

  • Optional maxLength?: number

    Max length of field

  • Optional numberRules?: {
        max?: number;
        min?: number;
    }

    Remarks

    number only. Min and Max for numbers. If not set any number (including negative is valid)

    • Optional max?: number
    • Optional min?: number
  • Optional onBlur?: ((event) => void)
      • (event): void
      • Blur event when focus is lost

        Parameters

        • event: NativeSyntheticEvent<TextInputFocusEventData>

        Returns void

  • onChangeText: ((value) => void)
      • (value): void
      • Change event when text changed

        Parameters

        • value: string

        Returns void

  • Optional onFocus?: ((event) => void)
      • (event): void
      • Focus event when focus is gained

        Parameters

        • event: NativeSyntheticEvent<TextInputFocusEventData>

        Returns void

  • Optional onSubmitEditing?: (() => void)
      • (): void
      • Trigger ENTER event (consumer should validate if form is valid and submit if this is called)

        Returns void

  • Optional placeholder?: string

    Placeholder text to use

  • Optional required?: boolean

    Indicate if required

  • Optional secureTextEntry?: boolean

    Indicate if should be secured (password)

  • Optional style?: StyleProp<ViewStyle>

    Style to set on the item

  • Optional textAreaMinHeight?: number

    minHeight for text area

  • Optional togglePasswordText?: string

    Remarks

    password only. Text to use for toggle password button (accessibility). Defaults to ENGLISH "Show/hide password"

  • value: string

    Value of text (Controlled component)

  • Optional warningText?: string

    Warning string to use. This will show if NOT in error.

Generated using TypeDoc