https://github.com/fulll/react-enhanced-form
The best react form component, on earth :earth_africa:
https://github.com/fulll/react-enhanced-form
Last synced: about 1 year ago
JSON representation
The best react form component, on earth :earth_africa:
- Host: GitHub
- URL: https://github.com/fulll/react-enhanced-form
- Owner: fulll
- License: mit
- Archived: true
- Created: 2016-08-03T08:41:08.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-01-04T15:50:03.000Z (over 7 years ago)
- Last Synced: 2025-03-30T09:01:46.662Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 2.19 MB
- Stars: 133
- Watchers: 9
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### [Live](https://inextensodigital.github.io/react-enhanced-form/)
### [Show-room](https://inextensodigital.github.io/react-showroom/#input)
# react-enhanced-form
## Usage
```sh
yarn add react-enhanced-form
```
```jsx
import React from 'react'
import Input from 'react-enhanced-form'
class Main extends React.Component {
style = {
default: { width: 300 },
onFocus: { borderBottom: '1px solid green' },
onError: { borderBottom: '1px solid red' }
}
check = newValue => newValue < 10
format = value => `${value} $`
render = () => (
console.log('change', data, error)}
onMount={(data,error) => console.log('mount', data, error)}
style={this.style}
check={this.check}
format={this.format}
required
/>
)
}
```