# react-bforms

> React boostrap form components.

Latest version **0.4.1** (published 2018-10-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-bforms
pnpm add react-bforms
yarn add react-bforms
bun add react-bforms
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2018-10-08 |
| First published | 2015-05-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 254.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | qbuben |
| Keywords | react, react-component, forms |

## Links

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

## Dependencies (1)

- [react](https://npm.io/package/react.md) ^15.1.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.4.1 (latest) — 2018-10-08
- 0.4.0 — 2016-08-30
- 0.3.1 — 2016-04-13
- 0.3.0 — 2016-04-12
- 0.2.0 — 2015-10-14
- 0.1.4 — 2015-05-09
- 0.1.3 — 2015-05-06
- 0.1.2 — 2015-05-06
- 0.1.1 — 2015-05-06
- 0.1.0 — 2015-05-06

## README

# React Bootstrap Forms


[Demo](http://qbuben.bitbucket.org/react-bforms/)


## Quick example

```javascript
import BForms from 'react-bforms';
var {Form, Input} = BForms;


export class LoginForm extends React.Component {

    render() {
        return (
            <Form ref='form' onSubmit={this._onSubmit.bind(this)}>
                <Input name='username'
                       label='Email'
                       type='email'
                       validators={[username()]}/>

                <Input name='password'
                       label='Password'
                       type='password'
                       validators={[password()]}/>

                <div>
                    <button className='btn btn-primary'>Login</button>
                </div>
            </Form>
        );
    }

    _onSubmit() {
        var values = this.refs.form.getValues();
        console.log(values);
    }
};


var username = function(message) {
    message = message || 'Example: username@example.com';

    return function(value) {
        if (value.indexOf('@') === -1) {
            return message;
        }

        return '';
    };
};


var password = function(message) {
    message = message || 'Please enter password';

    return function(value) {
        if (!value) {
            return message;
        }

        return '';
    };
};
```

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