1.0.12 • Published 10 months ago

react-text-input-mask v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

react-text-input-mask

react-text-input-mask is a React component that provides input masking functionality. It allows you to enforce a specific input format, such as phone numbers, card number, or any custom pattern, directly within an input field.

Getting Started

Installation

This package is already published to NPM, use npm or yarn to download to local directory.

npm i react-text-input-mask
yarn add react-text-input-mask

Example

Import react-text-input-mask

import { MaskedInput } from 'react-text-input-mask';

Basic usage

<MaskedInput mask='TR99 9999 9999 9999 9999 9999 99'>
    <input placeholder='Enter IBAN' />
</MaskedInput>
<MaskedInput mask='99/99'>
    <input placeholder='MM/YY' />
</MaskedInput>

You can use ant design

import { Input } from 'antd';

<MaskedInput mask='9999 9999 9999 9999'>
    <Input placeholder='Enter card number'/>
</MaskedInput>

You can use styled-components

import styled from 'styled-components';
const StyledInput = styled.input``;

<MaskedInput mask='(999) 999 99 99'>
    <StyledInput placeholder='Enter phone number'/>
</MaskedInput>
1.0.12

10 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago