mihalik / react-login-ui

React component for login/create/forgot dialog.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Login UI

First pass on a reusable (and themeable) interaction component for React.

This project is still early and the interface will likely change.

Install

TODO

Screenshot

Screenshot

Usage

The login functions and results are provided as properties to the login ui component. Here is a simplified example. See the examples folder for other examples.

React.createClass({

  login(username, password) {
    console.log('Attempted login as ' + username);
    this.setState({loginError: "Unable to login"});
  },

  render() {
    return (
      <Login
        loginAction={this.login}
        errorMessage={this.state.loginError}
      />
    );
  }

});

Override Theme

This project uses react-themeable in an attempt to make it easy to override built-in themes. React-themable supports a number of different styling mechanisms. See theme-css and theme-inline examples for two examples of overriding the default styles for the component.

Development

This project uses rackt-cli to eliminate some of the boilerplate around maintaining components.

$ npm install -g rackt-cli

About

React component for login/create/forgot dialog.

License:MIT License


Languages

Language:JavaScript 86.5%Language:HTML 7.9%Language:CSS 5.5%