react-ui-form

1.2.4 • Public • Published

react-ui-form

NPM version Build status Dependency Status Downloads

The UI Component that providing basic form controls which is compatible with React.js

Get Started

import {
  UIForm,
  UIRow,
  UITextInput,
  UIButton,
} from 'react-ui-form';
 
class ExampleForm extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      username: null,
      password: null,
    };
  }
  onLogin() {
    // this.state.username
    // this.state.password
  }
  render() {
    return (
      <UIForm>
        <Row name="username">
          <UITextInput bindStateCtx={this} bindStateName="username" />
        </Row>
        <Row name="username">
          <UITextInput bindStateCtx={this} bindStateName="username" password={true} />
        </Row>
        <Row name="username">
          <UIButton text="login" onClick={this.onLogin.bind(this)} />
        </Row>
      </UIForm>
    )
  }
}
 

Components

Installation

$ npm install react-ui-form

Tests

$ npm install
$ npm test

Example

cd examples
$ npm install && npm start
$ open ./index.html

License

MIT @ WeFlex

Readme

Keywords

Package Sidebar

Install

npm i react-ui-form

Weekly Downloads

8

Version

1.2.4

License

MIT

Last publish

Collaborators

  • yorkie