New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-text-input-mask

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-text-input-mask

React component for masked text input

latest
Source
npmnpm
Version
1.0.12
Version published
Maintainers
0
Created
Source

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>

Keywords

react

FAQs

Package last updated on 27 Jun 2024

Did you know?

Socket

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.

Install

Related posts