1.1.2 • Published 2 years ago

@swiftcarrot/react-form v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

react-form

npm npm Build Status codecov styled with prettier

Easy React form with context and hook

Features

  • Easy form components
  • Auto disable on submit
  • Multiple submit buttons support
  • Nested attributes support

Installation

yarn install @swiftcarrot/react-form
# npm install @swiftcarrot/react-form --save

Quick start

import React from 'react';
import {
  Form,
  FormLabel,
  FormControl,
  FormError,
  FormSubmit,
} from '@swiftcarrot/react-form';

function App() {
  function handleSubmit(values) {
    console.log(values);
  }

  return (
    <Form onSubmit={handleSubmit}>
      <FormLabel name="name">Name</FormLabel>
      <FormControl name="name" />
      <FormError name="name" />
      <FormSubmit />
    </Form>
  );
}

License

MIT

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago