NextStep - Lightweight Next.js Onboarding Library Logo

Basic Setup for React

Learn how to set up NextStep in your React project. This guide will walk you through the basic configuration needed to get started.

Wrap your application in NextStepProvider and NextStepReact, then supply the steps array to NextStep. See the Tour Steps page for more information about creating steps.

Basic React Setup

import { NextStepProvider, NextStepReact } from 'nextstepjs';
import { useReactRouterAdapter } from 'nextstepjs/adapters/react-router';

const steps = [
  {
    tour: "mainTour",
    steps: [
      {
        icon: "👋",
        title: "Welcome",
        content: "Let's get started with NextStep!",
        selector: "#step1",
        side: "right",
        showControls: true,
        showSkip: true
      },
      // More steps...
    ]
  }
];

function App() {
  return (
    <NextStepProvider>
      <NextStepReact steps={steps}>
        <YourAppContent />
      </NextStepReact>
    </NextStepProvider>
  );
}

Next Steps

Now that you have set up NextStepjs in your React project, you can explore more features: