0.22.0 • Published 1 year ago

@opentf/react-form v0.22.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.21.1

1 year ago

0.21.0

1 year ago

0.20.0

2 years ago

0.19.0

2 years ago

0.18.3

2 years ago

0.18.2

2 years ago

0.18.1

2 years ago

0.18.0

2 years ago

0.17.0

2 years ago

0.16.0

2 years ago