Installation
Install FormMorf in your React project using your preferred package manager.
Requirements
- • React 17.0.0 or higher
- • React DOM 17.0.0 or higher
- • Node.js 16.0.0 or higher
Install the package
Choose your package manager and run the installation command:
npm
bash
npm install @formmorf/builderpnpm
bash
pnpm add @formmorf/builderyarn
bash
yarn add @formmorf/builderPeer Dependencies
FormMorf requires the following peer dependencies to be installed in your project:
bash
npm install react react-dom immer
# Or if using pnpm
pnpm add react react-dom immer
# Or if using yarn
yarn add react react-dom immerNote: If you already have React and React DOM installed, you only need to add immer.
Import Styles
Import the CSS file in your application's entry point or layout component:
tsx
import '@formmorf/builder/dist/style.css';Verify Installation
Create a simple test to verify the installation:
tsx
import { FormBuilder } from '@formmorf/builder';
import '@formmorf/builder/dist/style.css';
function App() {
return (
<div>
<h1>FormMorf Test</h1>
<FormBuilder
initialSchema={{
title: 'Test Form',
description: '',
fields: []
}}
/>
</div>
);
}
export default App;