Components

Overview of the form components available in the Mantlz SDK

Mantlz Form Components

The Mantlz SDK provides several React components for creating different types of forms. Each component is designed for a specific use case.

Available Components

WaitlistForm

Collect email addresses from users interested in your product or service. Ideal for pre-launch or early access waitlists.

import { WaitlistForm } from '@mantlz/nextjs';

<WaitlistForm 
  formId="your-waitlist-id"
  title="Join Our Waitlist"
  description="Be the first to know when we launch"
  showUsersJoined={true}
/>

View WaitlistForm documentation →

FeedbackForm

Collect user feedback with star ratings and optional comments. Perfect for gathering customer satisfaction data.

import { FeedbackForm } from '@mantlz/nextjs';

<FeedbackForm 
  formId="your-feedback-id"
  title="Rate Your Experience"
  description="We value your feedback"
/>

View FeedbackForm documentation →

ContactForm

Create a comprehensive contact form with name, email, subject, and message fields. Ideal for contact pages.

import { ContactForm } from '@mantlz/nextjs';

<ContactForm 
  formId="your-contact-id"
  title="Get in Touch"
  description="We'd love to hear from you"
/>

View ContactForm documentation →

Key Features

All form components provide the following key features:

Event Handlers

Handle form submissions and errors with callback functions:

<WaitlistForm
  formId="your-waitlist-id"
  onSubmitSuccess={(data) => console.log('Success:', data)}
  onSubmitError={(error) => console.error('Error:', error)}
/>

Post-Submission Redirects

Redirect users to a custom page after successful form submission (available on STANDARD and PRO plans):

<ContactForm
  formId="your-contact-id"
  redirectUrl="/thank-you"
/>

Getting Started

To get started with any of these components:

  1. Install the SDK
  2. Choose the appropriate form component for your needs
  3. Implement form submission handlers
  4. Deploy your form!