How to Develop a Component in Sitecore with Next.js?
In this article, we will walk you through the steps required to develop a component in Sitecore using Next.js. To add more context, and help you understand better we will assume the below scenario. We will create a testimonial component in Sitecore Next.js.
For this, you need to have a Sitecore instance with a JSS module, and a Next.js application connected to Sitecore. Find the demo in the below steps.

Alignment: Centre-aligned
View Type: Card View
Approach: Sitecore First Approach
Content Details:
- Card Title
- Round Avatar
- Testimonial Detail
- Authors
- Author Designation
Architecture:
Start with Setting Up Sitecore
Step 1: Template Creation
-
Go to Templates-> Locate project folder -> Create a template for the Testimonial component. Next, you create cards and provide their source (Item ID) to the Cards field.
Note: This folder will be created when you connect and deploy your Next.js application with Sitecore.

- Under the same folder, create a template to define the cards of the testimonial.

Step 2: Creating Rendering
- Navigate to the project folder under Renderings and insert a JSON Rendering.
- Provide desired content resolver to the rendering.

Step 3: Creation of Page and Rendering Component
- Create an App Route for the redirecting request to the desired page.

Step 4: Creating Data for Page
- Navigate to content folder -> Create new folder -> Choose the template which you have recently designed.

- Create a separate folder for Cards, now create cards using Template you made in the above steps.
- After creating cards fill in all the necessary details.

- Choose the cards you want to select.

Step 5: Adding Rendering to Your Page
- Go to Presentation-> Details-> Add Rendering-> Choose Place Holder for rendering.

- Provide the Data Source that you have created.


Setting Up Your Next.js Application
1. Scaffold the Component you have just created.
2. Implement the desired code changes on the scaffolded component.


3. Provide CSS to your component.

4. Deploy the application to Sitecore.
![]()
5. Connect the Next.js application.
![]()
Final Output

And that’s it. Creating a component using Next.js in Sitecore is that easy. In case you have any queries about the implementation of Sitecore JSS and Next.js, reach out to our experts today.