viskan-deku-form

3.0.1 • Public • Published

viskan-deku-form Build Status

Form components for deku

Install

$ npm install --save viskan-deku-form

Usage

import {Form, InputField} from 'viskan-deku-form';
 
function handle(data, form) {
    console.log(data);
    //=> 'username=foo&password=unicorn'
}
 
export function render() {
    return (
        <Form onSubmit={handle}>
            <InputField name='username' label='Username'  validate={['onChange', 'onBlur', 'onInput']} required/>
            <InputField name='password' label='Password' minLength='6' required/>
            <button type='submit'>Sign in</button>
        </Form>
    );
}

Package Sidebar

Install

npm i viskan-deku-form

Weekly Downloads

1

Version

3.0.1

License

none

Last publish

Collaborators

  • alonalon
  • anton-johansson
  • gillstrom
  • henrikpeszlen
  • michaelbergquistsuarez