@maskin/react

0.2.0 • Public • Published

Maskin react

Maskin module for working with React applications. It provides useful stuff like masking components for you to use within your React projects.

Installing

npm i -S @maskin/react

#or

yarn add @maskin/react

The Mask component

The Mask component is a higher-order component that uses the children render pattern to keep logic into the component but it delegates the responsibility of rendering to the children.

Example:

import { Mask } from "@maskin/react";
<Mask pattern="###-xxx">
  {({ value, handleChange }) => (
    <input type="text" value={value} onChange={handleChange} />
  )}
</Mask>

The Input component

The Input component is a useful component for quick usage of masking.

Example:

import { Input } from "@maskin/react";
<Input mask="xxx.xxx-##" />

License

MIT License

Readme

Keywords

Package Sidebar

Install

npm i @maskin/react

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

62.4 kB

Total Files

19

Last publish

Collaborators

  • bruno02221