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

react-input-masked

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-input-masked

The react-input-mask is a react component that returns an input-mask with the sanitized value and formatted for use

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
7
-56.25%
Maintainers
1
Weekly downloads
 
Created
Source

react-input-masked

The react-input-mask is a react component that returns an input-mask with the sanitized value and formatted for use

Getting Started

  • First. You need to install it, just like. You would do with most any NPM packages:
npm i --save react-input-masked

Or with yarn:

yarn add react-input-masked
  • Then, you need to import the library component within your own component
import React from 'react'
import MaskedInput from 'react-input-masked'
  • You can now start using the component
import React, { useState } from 'react'
import MaskedInput from 'react-input-masked'

const AnyComponent = () => {
    const [cpf, setCpf] = useState('')

    return <MaskedInput type="cpf" onChange={event => setCpf(event.target.value)} />
}

The "type" property of the component in version 1.0.4 can receive the following values:

cpf, cnpj, cep, phone

New masks will be added in future versions.

Keywords

input

FAQs

Package last updated on 01 Apr 2021

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