react-ocean-forms-bootstrap
v4.2.4
Published
Forms components for react based on the context api.
Downloads
84
Readme
react-ocean-forms-bootstrap
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>