SDKs & Libraries

Official SDKs and libraries for integrating Formr into your applications. Available for JavaScript/TypeScript, React, and more.

JavaScript/TypeScript SDK

The Formr SDK works in browsers, Node.js, and Edge runtimes. Use publishable keys for client-side operations and secret keys for server-side operations.

Installation

npm install @formr/sdk

# or

yarn add @formr/sdk

Usage

import { Formr } from '@formr/sdk'

const formr = new Formr({
  publishableKey: 'pk_live_...' // or secretKey for server-side
})

// Submit form
const response = await formr.submit('form_123', {
  name: 'John Doe',
  email: 'john@example.com'
})

React Components

Pre-built React components for rendering forms and handling submissions.

Installation

npm install @formr/ui-react

Usage

import { FormRenderer } from '@formr/ui-react'

function ContactForm() {
  return (
    <FormRenderer
      formId="form_123"
      publishableKey="pk_live_..."
      onSubmit={(data) => console.log(data)}
    />
  )
}

CLI Tool

Command-line tool for managing forms, testing submissions, and local development.

Installation

npx @formr/cli

Related