
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
react-native-imask
Advanced tools
react-native-imask
Read this before using
I can't say that this plugin is production ready, use it on your own risk. React Native Textinput behavior differs from html input, varies by platform and contains several bugs (1, 2), so some things are not possible to implement. Any PRs are welcomed.
npm install react-native-imask
import {IMaskTextInput} from 'react-native-imask';
<IMaskTextInput
mask={Number}
radix="."
value="123"
unmask={true} // true|false|'typed'
onAccept={
// depending on prop above first argument is
// `value` if `unmask=false`,
// `unmaskedValue` if `unmask=true`,
// `typedValue` if `unmask='typed'`
(value, mask) => console.log(value) // probably should update state
}
// ...and more mask props in a guide
// other TextInput props
editable={true}
style={{
height: 40,
width: '100%',
borderColor: 'gray',
borderWidth: 1
}}
/>
import {IMaskNativeMixin} from 'react-native-imask';
// use `inputRef` to get reference for our custom text input component
const InputComponent = ({inputRef, ...props}) => (
<TextInput
ref={inputRef}
{...props}
/>
);
// wrap component with IMaskNativeMixin
const IMaskTextInput = IMaskNativeMixin(InputComponent);
// use MaskedComponent
<IMaskTextInput
mask="0000"
// ...other props
/>
More options see in a guide.
FAQs
React Native Input Mask
We found that react-native-imask demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.