@aarfeen/form-components
v0.2.3
Published
A collection of reusable form components built with React, Material UI, Formik, and Tiptap
Maintainers
Readme
@sms/form-components
A collection of reusable form components built with React, Material-UI, and Formik.
Installation
# Using npm
npm install @sms/form-components
# Using yarn
yarn add @sms/form-componentsPeer Dependencies
This package has the following peer dependencies. Make sure they are installed in your project:
- @emotion/react
- @emotion/styled
- @mui/material
- @mui/lab
- formik
- react
- react-dom
Available Components
- AppAutoComplete
- AppCheckBox
- AppDatePicker
- AppDateAndTimePicker
- AppFormErrorMessage
- AppInputField
- AppMultiSelector
- AppPhoneNoInput
- AppRadioGroup
- AppRating
- AppRichTextEditor
- AppSearchableMultiSelector
- AppSearchableSelect
Usage
import { AppInputField } from '@sms/form-components';
function MyForm() {
return (
<Formik
initialValues={{ name: '' }}
onSubmit={(values) => console.log(values)}
>
{() => (
<Form>
<AppInputField name="name" label="Name" />
{/* Other form fields */}
<Button type="submit">Submit</Button>
</Form>
)}
</Formik>
);
}License
MIT
