What is Next.js?
Next.js is a React framework for building full-stack web applications. You use React Components to build user interfaces, and Next.js for additional features and optimizations.Prerequisites
Before you begin, you’ll need to have a Formbox form. If you don’t have one yet, you can create a new form by following the steps in the Introduction guide. Once you have your form, make a note of the form’s endpoint url in the setup tab of your form page, as you’ll need it later.Creating a new Next project
To get up and running quickly, we will follow the official Next installation guide to create a new Next project. In your terminal, run the following command:Yes
for Tailwind CSS
and App Router
.
http://localhost:3000
. You should see a new Next application running.

Adding your Formbox form to your Next project
Now that we have a new Next project set up, let’s add our Formbox form to it. For styling purposes, we’ll use Tailwind CSS. You can learn how to add Tailwind CSS to your project by following the Next installation guide. When running create-next-app, we selectedYes
for Tailwind CSS
, so it should already be set up in your project. If not, you can add it by following the guide linked above.
Once you have Tailwind CSS set up, let’s add our form.
Open up the page.tsx
file within the root of the app
directory and replace everything in the file with the following code block:
page.tsx
action
attribute as shown in the code block above.
Save the file and navigate to http://localhost:3000
in your browser. You should see a form that you can fill out and submit.

