You can add Modular Forms to your project via npm. If you use yarn or pnpm, just replace the installation command at the beginning.

Modular Forms is currently not compatible with Next.js. Read more here.

npm install @modular-forms/react

Since Modular Forms for React is implemented with Preact Signals, you need to install the following peer dependency as well.

npm install @preact/signals-react

After that you can import it into any JavaScript or TypeScript file.

import {} from '@modular-forms/react';