7.5.0 • Published 9 days ago

react-imask v7.5.0

Weekly downloads
21,515
License
MIT
Repository
github
Last release
9 days ago

React IMask Plugin

react-imask

npm version License: MIT

Install

npm install react-imask

Mask Input Example

import {IMaskInput} from 'react-imask';

<IMaskInput
  mask={Number}
  radix="."
  value="123"
  unmask={true} // true|false|'typed'
  inputRef={el => this.input = el}  // access to nested input
  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)
  }
  // ...and more mask props in a guide

  // input props also available
  placeholder='Enter number here'
/>

Extend Existing Components

import {IMaskMixin} from 'react-imask';

// extend style component
const StyledInput = styled.input`
  color: paleviolet;
`;

const MaskedStyledInput = IMaskMixin(({inputRef, ...props}) => (
  <StyledInput
    {...props}
    innerRef={inputRef}  // bind internal input (if you use styled-components V4, use "ref" instead "innerRef")
  />
));

<MaskedStyledInput
  mask={Number}
  radix="."
  onAccept={(value, mask) => console.log(value)}
  // ...and more mask props in a guide

  // ...other styled props
/>

More options see in a guide.

Many Thanks to

@Yordis Prieto

@Alexander Kiselev

Support Development

Paypal

bgc-shared-frontend-componentsbolideai-polaris-ui-kitqui-ds-tssapphire-uicf-storybookempath-video-player@bumped-inc/loyalty.designfeathery-elementsxh-common-pckxinherc1feathery-reactreact-govbr-uixinherc_testreact-ts-form-gen-elements@self-kit/uimy-test-devcff-uireact-mui-form-generatorraylo-apollo@everything-registry/sub-chunk-2561caseark-uitr-vonus-nextjs-storybook-v1hyfgnlutzxbfkhvnkui-basicilive-ui-kitmui-simpleiebt-zing-storybookintersoft-componentesmy-yura-componentnessus-uimetrocuadrado-ui@rede-ancora/turbo-ui@sparklink-pro/apant@thewhite/react-input@vagaspcd-ui/react@quark-uilib/components@q-free/q-ds-ts@q-free/ui@raisenow/tamaro-core@raisesistemas/ds@skbkontur/react-ui@ra-libs/react@rainbow-d9/n2@solace-health/ui@romger/react-input@ssplib/react-components@roofmaxx/form@s-ui/react-atom-input@studyworld/kit-test@technokratos/components-react@team-monite/ui-widgets-react@self-kit/components@w3block/w3block-ui-sdk@zydon/common@web3chief/ui@tucar/pit-stopame-miniapp-components-webame-miniapp-components@andrydharmawan/bgs-component@andrydharmawan/bgs-form@andrydharmawan/component-react@axinom/mosaic-ui@comparaonline/admin@backlight-dev/another-one.bricks-2htydw13pkxg0gsvc@backlight-dev/cent-undress-o9ffc.bricks-l6ngliw7@backlight-dev/power-drive-tgm7r.bricks-lo057i5n@backlight-dev/hdn-test.hdn-bricks@backlight-dev/human-apple-pfrt9.bricks-l0gqrlz3@backlight-dev/icky-boys-h9rid.bricks-lglce3zu@backlight-dev/rapid-sweater-1n8dt.bricks-l3yzvl9gcomponent-ui-design@cyrilis/flame@bitrise/bitkit@backlight-dev/various-trouble-hjmth.bricks-lgq27cpj@backlight-dev/veil-steal-hej64.bricks-l7gtkkiy@backlight-dev/various-trouble-hjmth.bricks-l6ngliw7-fork-lgq24azv@backlight-dev/setbrain.ink-forego-vnavb.bricks-l5gkcnmk@backlight-dev/sillyleo.bricks-lccvkr2p@backlight-dev/soap-distribute-dux20.rjid@blockium/ui@bluemarble/bm-components@calvient/decal@canopyinc/aura@canadi/ui@getevy/evy-ui@getinapp/appetizer@getlove/reactobiiqubryx-react-componentprimeobjects-ui-web-basicprocessorui_libraryreact-bootstrap-frontreact-cart-testreact-dynamic-form-composerreact-masked-mui-textfieldreact-native-imaskpj-login-packagereact-burgosreact-bootstrap-uizygote-cart-clone
7.5.1-alpha.0

9 days ago

7.5.0

1 month ago

7.4.0

2 months ago

7.3.1-alpha.0

2 months ago

7.3.0

3 months ago

7.2.1

3 months ago

7.2.0

4 months ago

7.0.0-alpha.1

10 months ago

7.0.0-alpha.0

10 months ago

7.0.0-alpha.6

9 months ago

7.1.3

8 months ago

7.0.0-alpha.3

10 months ago

7.1.2

9 months ago

7.0.0-alpha.2

10 months ago

7.1.1

9 months ago

7.0.0-alpha.5

10 months ago

7.0.0-alpha.4

10 months ago

6.6.3

10 months ago

6.6.2

10 months ago

7.0.1-alpha.0

9 months ago

7.0.0

9 months ago

7.0.1-alpha.1

9 months ago

7.0.1

9 months ago

7.1.0-alpha.0

9 months ago

7.1.0-alpha.1

9 months ago

7.1.0-alpha.2

9 months ago

6.5.1-alpha.1

12 months ago

6.5.1-alpha.0

12 months ago

6.5.0

12 months ago

6.6.0-alpha.0

12 months ago

6.6.1

11 months ago

6.6.0

12 months ago

6.5.0-alpha.1

12 months ago

6.5.0-alpha.0

1 year ago

6.5.1

12 months ago

6.6.1-alpha.2

11 months ago

6.6.1-alpha.1

11 months ago

6.6.1-alpha.0

11 months ago

6.4.3-alpha.0

2 years ago

6.4.3-alpha.1

2 years ago

6.4.3

2 years ago

6.3.0

2 years ago

6.4.1-alpha.0

2 years ago

6.4.2

2 years ago

6.3.0-alpha.0

2 years ago

6.4.1

2 years ago

6.4.0

2 years ago

6.2.2

3 years ago

6.2.1

3 years ago

6.2.0

3 years ago

6.1.0

3 years ago

6.0.7

3 years ago

6.0.6

3 years ago

6.0.5

4 years ago

6.0.3

4 years ago

6.0.2

4 years ago

6.0.1

4 years ago

6.0.0

4 years ago

6.0.0-alpha.0

4 years ago

5.2.1

5 years ago

5.2.0

5 years ago

5.1.9

5 years ago

5.1.8

5 years ago

5.1.7

5 years ago

5.1.6

5 years ago

5.1.5

5 years ago

5.1.4

5 years ago

5.1.3

5 years ago

5.1.2

5 years ago

5.1.1

5 years ago

5.1.0

5 years ago

5.0.0

5 years ago

4.1.5

5 years ago

4.1.4

5 years ago

4.1.3

5 years ago

4.1.2

5 years ago

4.1.1

5 years ago

4.1.0

5 years ago

4.0.0

6 years ago

3.4.0

6 years ago

3.3.0

6 years ago

3.2.4

6 years ago

3.2.3

6 years ago

3.2.2

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago