Skip to content

MaskedMultilineTextInput

Component | Source Code

extends Omit<MultilineTextInputProps, “onChangeText”>

Props Inheritance Hierarchy: Omit<MultilineTextInputProps, “onChangeText”>

Receives user input in the form of text. Allows masking the input to limit accepted characters.

You can choose whether you control this component, but if you don’t control it, the component will control the underlying input for you. This allows a provided mask to still apply to the user input.

Mask to apply to the input. The masking is applied using maskText. Because this component is intended to allow multiline text, your regex does not need to explicitly allow newlines.

const onlyNumbersMask = /\d/;

Handler for when the user attempts to change the input.