React Embedding

Start of documentation content

Formally uses React internally and it integrates easily with React.

Prerequisites

  • React
  • A published form

Install

Formally can be used in React by installing the formally package.

1. Install Formally

Either via NPM:

npm i formally

or Yarn:

yarn add formally

2. Use Formally in React.

Assuming you've already made a form in the form builder then it's as simple as,

import { Formally } from 'formally';
import 'formally/build/styles.min.css';

export const MyForm = () => <Formally formBuilderId="your-form-id" />;

Replace the your-form-id with your form builder id which can be found in the 'Embed' modal on your dashboard. Only published forms will have the 'Embed' button that opens this modal.

Using other props will require an SDK Licence. See React SDK for more.