Vue logo

Next Js: How to set up in 3 steps


Only works for Next.js 14+ projects


Step 1: Install the Official Rasp Npm Package

1
npm install rasp-feedback

Step 2: Set your companyId as NEXT_PUBLIC_RASP_COMPANY_ID in your environment variables. You can find you companyId in your dashboard settings:


1
NEXT_PUBLIC_RASP_COMPANY_ID=your_companyId

Step 3: Wrap your page with our RaspProvider component in the layout/page you want your forms and feature boards to appear on


1
import { RaspProvider } from "rasp-feedback/nextjs";
2
3
export default function HomePage() {
4
return (
5
<main>
6
7
<RaspProvider>
8
9
<OtherComponents />
10
11
</RaspProvider>
12
13
</main>
14
);
15
}


This will provide a launcher for user to click to complete your form. It will automatically show the form that you have set for this url in your website


How to use form as a Component


Import RaspForm and place it where you want to appear and Rasp will automatically check which form must be shown on this url


1
import { RaspForm } from "rasp-feedback/nextjs";
2
3
export default function HomePage() {
4
return (
5
<main>
6
<RaspForm />
7
8
</main>
9
);
10
}