2.0.1 • Published 3 years ago
cl-form-component v2.0.1
cl-form-component
Easily create forms in React with validation and TypeScript support using material-ui 4.
This library is built on top of cl-use-form-state and uses material-ui 4 as its component suite. All components can be fully customized within the boundaries of material-ui.
Peer Dependencies
- react >=17.0.2
- react-dom >=17.0.2
- @material-ui/core >=4.12.3
Install
yarn add cl-form-component
Usage
Check out this link for StoryBook examples.
Check out full documentation here.
import { Form } from "cl-form-component";
type FormInputs = {
something: string;
};
<Form<FormInputs>
entries={{
something: {
input: {
initialValue: "",
},
},
}}
onFormSubmit={(isValid, inputs) => console.log(isValid, inputs)}
/>;