Bootstrap input components for react-ocean-forms with reactstrap
.
API Documentation and Showcase
- Multiple input types out of the box
- Easy usage including eGOV SG 3.0 compliance
npm install react-ocean-forms-bootstrap
yarn add react-ocean-forms-bootstrap
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>