Gathering detailed insights and metrics for @idui/react-mask-input
Gathering detailed insights and metrics for @idui/react-mask-input
Gathering detailed insights and metrics for @idui/react-mask-input
Gathering detailed insights and metrics for @idui/react-mask-input
npm install @idui/react-mask-input
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1 Stars
12 Commits
2 Branches
1 Contributors
Updated on Jan 17, 2023
Latest Version
1.2.1
Package Id
@idui/react-mask-input@1.2.1
Unpacked Size
21.87 kB
Size
7.47 kB
File Count
5
NPM Version
6.14.13
Node Version
14.17.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
33
1npm install --save @idui/react-mask-input
1yarn add @idui/react-mask-input
1import React from 'react' 2import MaskInput from '@idui/react-mask-input' 3 4function Example() { 5 const [value, setValue] = useState(''); 6 7 return <MaskInput 8 value={value} 9 onChange={setValue} 10 mask="9999 9999 9999 9999" 11 maskPlaceholder="0000 0000 0000 0000" 12 fitWidthToMask={false} // whether resize input to mask width or not, default false 13 placeholder="Enter Card Number" 14 />; 15}
1import React from 'react' 2import MaskInput from '@idui/react-mask-input' 3 4const dateRegex = /^(0[1-9]|[1-2]\d|3[0-1])\/(0[1-9]|1[0-2])\/[1-9]\d{3}$/; 5const validDate = '01/01/2020'; 6 7const validateMaskedValue = (currentMaskedValue) => 8 dateRegex.test( 9 currentMaskedValue + validDate.substring(currentMaskedValue.length) 10 ); 11 12function DateValidation() { 13 const [value, setValue] = useState(''); 14 15 return <MaskInput 16 value={value} 17 onChange={setValue} 18 mask="99/99/9999" 19 maskPlaceholder="DD/MM/YYYY" 20 validateMaskedValue={validateMaskedValue} 21 />; 22}
1import React from 'react' 2import MaskInput from '@idui/react-mask-input' 3 4function Example() { 5 const [value, setValue] = useState(''); 6 7 return <MaskInput 8 value={value} 9 onChange={setValue} 10 tokens={{ 11 0: '$', 12 2: '.', 13 }} 14 defaultSymbolPlaceholder=" " 15 />; 16}
1import React from 'react' 2import styled from 'styled-components'; 3import { ifProp } from 'styled-tools'; 4import MaskInput, {Placeholder} from '@idui/react-mask-input' 5 6const Container = styled.div` 7 height: 40px; 8 display: flex; 9 align-items: center; 10 padding: 0 10px; 11 border-radius: 5px; 12 border: 1px solid #b4b4b4; 13 color: #313131; 14 margin-bottom: 10px; 15 &:focus-within { 16 border: 1px solid #a569ed; 17 } 18 ${Placeholder} { 19 color: ${ifProp({disabled: true}, '#EFEFEF', '#B4B4B4')}; 20 } 21`; 22 23function Example() { 24 const [value, setValue] = useState(''); 25 26 return <Container> 27 <MaskInput 28 value={value} 29 onChange={setValue} 30 mask="9999 9999 9999 9999" 31 maskPlaceholder="0000 0000 0000 0000" 32 placeholder="Enter Card Number" 33 /> 34 </Container>; 35}
MIT © kaprisa57@gmail.com
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/12 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
93 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More