react-ocean-forms-bootstrap

Forms components for react based on the context api.

Usage no npm install needed!

<script type="module">
  import reactOceanFormsBootstrap from 'https://cdn.skypack.dev/react-ocean-forms-bootstrap';
</script>

README

react-ocean-forms-bootstrap

npm GitHub license travis Greenkeeper badge Coverage Status

Bootstrap input components for react-ocean-forms with reactstrap.

API Documentation and Showcase

Features

  • Multiple input types out of the box
  • Easy usage including eGOV SG 3.0 compliance

Install

npm install react-ocean-forms-bootstrap

yarn add react-ocean-forms-bootstrap

Usage

To use the components you need a react-ocean-forms Form. Then you can simply use the components inside of a Form.

import { Form } from 'react-ocean-forms';
import { Input, ValidationSummary } from 'react-ocean-forms-bootstrap';

Then use the components where needed.

<Form
  onSubmit={this.handleSubmit}
  onValidate={this.handleValidate}
  defaultValues={{ name: 'test'}}
  asyncValidateOnChange
>
  <ValidationSummary />

  <Input
    name="name"
    label="demo_name"
  />

  <button type="submit">Submit</button>
</Form>

Documentation and Showcase

API Documentation and Showcase