Skip to content
Lazyform

Contact form for Framer

Add a contact form to your Framer site as a code component with a key you set in the panel. Get every submission by email, Telegram, Slack or Google Sheets.

Free plan: 250 submissions a month, forever.

Why a form backend for Framer

Framer makes designing a site fast, but a contact form still needs somewhere to send its data. If you want messages in Telegram or Slack, a Google Sheet for leads, or one inbox across all your client sites, a form backend is the simplest way.

Lazyform gives you that with one component. Spam checks, storage and delivery happen on our side.

A working contact form

In Framer, create a new code component (from the Assets panel, under Code) and paste this in. Then drag it onto your page and set the access key in the properties panel. Get your key at /login.

ContactForm.tsx
import { useState } from "react"
import { addPropertyControls, ControlType } from "framer"

export default function ContactForm({ accessKey, buttonText }) {
    const [status, setStatus] = useState("idle")
    const [error, setError] = useState("")

    async function onSubmit(event) {
        event.preventDefault()
        const form = event.currentTarget
        setStatus("sending")

        const res = await fetch("https://lazyform-api.xvelopers.com/submit", {
            method: "POST",
            headers: { Accept: "application/json" },
            body: new FormData(form),
        })
        const data = await res.json()
        if (data.success) setStatus("sent")
        else {
            setStatus("error")
            setError(data.error.message)
        }
    }

    if (status === "sent") return <p>Thanks! We'll be in touch.</p>

    return (
        <form onSubmit={onSubmit} style={{ display: "grid", gap: 12, width: "100%" }}>
            <input type="hidden" name="access_key" value={accessKey} />
            <input name="name" placeholder="Name" required />
            <input name="email" type="email" placeholder="Email" required />
            <textarea name="message" placeholder="Message" rows={5} required />
            <input type="checkbox" name="botcheck" className="hidden" style={{ display: "none" }} />
            <button type="submit" disabled={status === "sending"}>{buttonText}</button>
            {status === "error" && <p role="alert">{error}</p>}
        </form>
    )
}

ContactForm.defaultProps = { accessKey: "YOUR_ACCESS_KEY", buttonText: "Send" }

addPropertyControls(ContactForm, {
    accessKey: { type: ControlType.String, title: "Access key" },
    buttonText: { type: ControlType.String, title: "Button" },
})

Style the inputs to match your design by editing the style props, or add your own property controls for colors and fonts.

Get submissions where you want them

Every submission is emailed to you. Turn on Telegram, Slack, Discord or WhatsApp alerts, or add leads to Google Sheets, Notion or Airtable. See all integrations.

Full guide

The Framer guide covers the Embed option, styling, redirecting to a thank-you page and captcha.

Questions

Do I need to know React to use this?

Not really. Paste the code into a new code component, drag it onto the canvas and set your access key in the properties panel. You only touch the code to change fields.

Can I use an Embed instead of a code component?

Yes. Paste a plain HTML form into an Embed. The code component is nicer to work with because you can set the key and button text from the panel.

Can I reuse the component across pages and projects?

Yes. It behaves like any other Framer component. Each instance can use a different access key, so one component can serve several forms.