npm.io
0.6.2 • Published 7 years ago

prg-form

Licence
MIT
Version
0.6.2
Deps
0
Size
69 kB
Vulns
0
Weekly
0
Stars
1

Prg Form

React Form components for Bulma.css.

There is API Documentation.

Usage within Form


import { Form, Input } from 'prg-form';

<Form
    className="special-class"
    onSubmit={(values, form) => console.log(values)}
    onChange={(input) => console.log(input.name, input.getValue())}
    values={values}
>
    <Input type="email" name="inputName" label="Input Label" />
    <button>Submit</button>
</Form>

Usage without Form

  • onchange event is not passed to form

import { Input } from 'prg-form';

<Input
    name="inputName"
    label="Input Label"
    value={value}
    onChange={(value, input) => {}}
/>

Basic Form Components

  • import { Input } from 'prg-form';
    
    <Input
        name="inputName"
        label="Input Label"
        type="password"
        maxLength={24}
    />
  • import { Checkbox } from 'prg-form';
    
    <Checkbox
        name="checkbox"
        defaultValue
    />

Keywords