Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mariohmol/react-brazil
React Brazil contains formatting, validators and mask for brazillian like apps
https://github.com/mariohmol/react-brazil
Last synced: 1 day ago
JSON representation
React Brazil contains formatting, validators and mask for brazillian like apps
- Host: GitHub
- URL: https://github.com/mariohmol/react-brazil
- Owner: mariohmol
- Created: 2019-06-21T17:19:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-29T02:20:38.000Z (6 months ago)
- Last Synced: 2024-05-29T15:58:08.991Z (6 months ago)
- Language: TypeScript
- Homepage: http://geradorbrasileiro.com
- Size: 1.27 MB
- Stars: 17
- Watchers: 1
- Forks: 4
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-brazil
[![Build Status](https://travis-ci.org/mariohmol/react-brazil.svg?branch=master)](https://travis-ci.org/mariohmol/react-brazil)
> React Brazil contains formatting, validators and mask for brazillian like apps
See the [LIVE DEMO](https://glitch.com/~boiled-continent) !
Modules:
* CPF
* CNPJ
* RG
* Inscrição Estadual
* Telefone e Celular
* CEP
* Currency (Dinheiro)
* Time (horas e minutos)
* Number (numero e ponto decimal)
* Placa de Carro
* Renavam
* Título de Eleitor
* Proceso Jurídico## Install
```bash
npm install --save react-brazil
```## Usage
```tsx
import * as React from 'react'
import {BrazilFormatComponent , BrazilMaskComponent} from 'react-brazil'class Example extends React.Component {
constructor(props){
super(props);
this.value = '12345678900';
this.format = 'cpf';
}
render () {
return (
)
}
}
```# Demo
Demo component files are included in Git Project.
Demo Project:
[https://github.com/mariohmol/react-brazil/blob/master/example/)Used as reference the pipes/validators from:
* https://github.com/mariohmol/js-brasil
* https://github.com/text-mask/text-mask/tree/master/react#readme## Developer Guide
Fork this project and following the instructions below:
```sh
npm install
cd example
npm install```
to run the demo:* `npm start` in the root folder
* `npm start` in the `example` folder
the site will be at: localhost:3000## Todo
Create the validate component
``
## License
MIT © [mariohmol](https://github.com/mariohmol)