0.22.0 • Published 2 months ago

@opentf/react-form v0.22.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

 OPEN TECH FOUNDATION

React Form

Build

A simple form state manager for React.

Live Demo | Documentation

Features

  • Simple APIs to use

  • Supports nested & array fields

  • Supports form validation (Works with any schema validation lib)

  • Render optimized

  • TypeScript support

Installation

npm install @opentf/react-form
yarn add @opentf/react-form
pnpm add @opentf/react-form
bun add @opentf/react-form

Usage

import { Form, Field } from '@opentf/react-form';

export default function App() {
  return (
    <Form
      initialValues={{ field1: '', field2: '' }}
      onSubmit={(values) => {
        console.log(values);
      }}
    >
      <Field name="field1" />
      <Field name="field2" type="number" />
      <button type="submit">Submit</button>
    </Form>
  );
}

Examples

License

Copyright (c) Thanga Ganapathy (MIT License).

0.22.0

2 months ago

0.21.1

3 months ago

0.21.0

3 months ago

0.20.0

6 months ago

0.19.0

11 months ago

0.18.3

1 year ago

0.18.2

1 year ago

0.18.1

1 year ago

0.18.0

1 year ago

0.17.0

1 year ago

0.16.0

1 year ago