Next Js: How to set up in 3 steps
Only works for Next.js 14+ projects
Step 1: Install the Official Rasp Npm Package
1npm 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:
1NEXT_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
1import { RaspProvider } from "rasp-feedback/nextjs";23export default function HomePage() {4return (5<main>67<RaspProvider>89<OtherComponents />1011</RaspProvider>1213</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
1import { RaspForm } from "rasp-feedback/nextjs";23export default function HomePage() {4return (5<main>6<RaspForm />78</main>9);10}
