Getting Started
Rendering out your first form is as simple as importing the Formatic
library into your project.
Installation
To install Formatic with Yarn, run:
yarn init
yarn add @formatic/sdk
To install Formatic with NPM, run:
npm init
npm add @formatic/sdk
Note
During the Release Candidate phase, the library is not hosted publicly on NPM. To retrieve the latest candidate version, you’ll nee to authenticate with our private registry:
npm adduser --registry=https://npm.registry.formatic.com.au --scope=@formatic
If you have not received a username/password to authenticate with, please contact your account manager.
Rendering your first form
Rendering your first form is as simple as:
import React, { Component } from 'react';
import Formatic from '@formatic/sdk';
class MyForm extends Component {
render() {
return (
<div>
<Formatic
apiKey="api key"
formId={1}
environment="environment"
/>
</div>
);
}
}
For a complete list of props that are available to customize, see Props.