# @maskin/react

> Easy to use masking for React

Latest version **0.2.0** (published 2018-09-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @maskin/react
pnpm add @maskin/react
yarn add @maskin/react
bun add @maskin/react
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2018-09-29 |
| First published | 2018-09-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 60.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bruno02221 |
| Keywords | masking, react, library |

## Links

- npm: https://www.npmjs.com/package/@maskin/react
- npm.io page: https://npm.io/package/@maskin/react

## Dependencies (1)

- [@maskin/core](https://npm.io/package/@maskin/core.md) ^0.2.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2018-09-29
- 0.1.2 — 2018-09-24
- 0.1.1 — 2018-09-16
- 0.1.0 — 2018-09-16
- 0.0.1-alpha.0 — 2018-09-15

## README

# Maskin react

[Maskin](https://github.com/imbrn/maskin) module for working with React
applications. It provides useful stuff like masking components for you to use
within your React projects.

## Installing

```sh
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_](https://reactjs.org/docs/render-props.html#using-props-other-than-render)
to keep logic into the component but it delegates the responsibility of
rendering to the children.

_Example:_

```javascript
import { Mask } from "@maskin/react";
```

```jsx
<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:_

```javascript
import { Input } from "@maskin/react";
```

```jsx
<Input mask="xxx.xxx-##" />
```

## License

[MIT License](https://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/@maskin/react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
