Drop a SmashSend waitlist form into a React, Next.js or Remix app with a single component. No npm package, no bundle cost.
Last updated October 27, 2023
This guide shows you how to add a SmashSend waitlist form to React, so visitors can sign up and then refer other people to move up the queue. It takes a couple of minutes and does not require a developer.
You need a SmashSend account and a form. If you do not have one yet, create a free account first.
Open the form and go to the Integrate tab. Your form is hosted at a public URL that looks like this:
https://smashsend.com/f/YOUR_FORM_KEYReplace YOUR_FORM_KEY in every snippet below with the key from your own form.
This is the only code you need. It embeds the hosted form directly, so there is no script to load and nothing to keep up to date.
export function WaitlistForm() {
return (
<iframe
src="https://smashsend.com/f/YOUR_FORM_KEY"
title="Join the waitlist"
width="100%"
height={640}
style={{ border: 0, maxWidth: 560, width: "100%" }}
/>
);
}The same component works in Next.js, Remix, Gatsby, Astro and Vite. There is no SmashSend npm package to install: the hosted form is a plain iframe, which keeps your bundle size unchanged and avoids a third-party script on your site.
A waitlist form is more useful when each signup brings more signups. With referrals enabled, every person who joins gets a unique share link, and their position improves as people sign up through it. You can reward the top referrers automatically. See how to create a viral waitlist for the full setup, or read more about referral marketing with SmashSend.
If you get stuck, email support@smashsend.com or contact us and we will help you get it working.