OnboardSDK Documentation

A powerful React component for building interactive onboarding experiences

Implementation

To use OnboardSDK in your React application, follow these steps:

  1. Purchase and log in to your account from our website to get the OnboardSDK component.
  2. Place the OnboardSDK component file in your project's components directory.
  3. Import and use the component in your React application:
import React from 'react'
import { Onboarding } from './components/onboarding'
import { useUser } from '@clerk/nextjs'

export default function App() {
  const { isLoaded, isSignedIn } = useUser()
  const handleOnboardingComplete = () => {
    console.log('Onboarding completed')
  }

  if (!isLoaded) return <div>Loading...</div>

  return (
    <>
      {isSignedIn && (
        <Onboarding
          onComplete={handleOnboardingComplete}
          configUrl="/onboard-config.json"
        />
      )}
      <div id="welcome">
        <h1>Welcome to Our App</h1>
      </div>
      <div id="feature-overview">
        <h2>Our Features</h2>
        <ul>
          <li>Feature 1</li>
          <li>Feature 2</li>
          <li>Feature 3</li>
        </ul>
      </div>
    </>
  )
}

Configuration

OnboardSDK uses a JSON configuration file to define the onboarding steps. Create an onboard-config.json file in your public folder:

{
  "mode": "smooth",
  "steps": [
    {
      "id": "welcome",
      "title": "Welcome to Our App",
      "description": "Let's get you started with the basics.",
      "action": "focus",
      "arrowPosition": "bottom",
      "className": "custom-welcome-class"
    },
    {
      "id": "feature-overview",
      "title": "Feature Overview",
      "description": "Click here to see our main features.",
      "action": "click",
      "arrowPosition": "top",
      "className": "custom-feature-class"
    },
    {
      "id": "profile-setup",
      "title": "Set Up Your Profile",
      "description": "Let's personalize your experience.",
      "action": "focus",
      "arrowPosition": "left",
      "className": "custom-profile-class"
    },
    {
      "id": "final-step",
      "title": "You're All Set!",
      "description": "Click here to start using the app.",
      "action": "click",
      "arrowPosition": "right",
      "className": "custom-final-class"
    }
  ]
}

Configuration Options

OptionDescription
mode"smooth" for animated transitions, "brutal" for instant changes
stepsArray of step objects defining the onboarding flow

Step Object Properties

PropertyDescription
idUnique identifier for the step, matching an element ID in your app
titleTitle of the step
descriptionDetailed description of the step
action"focus" to highlight, "click" to click + highlight interaction (just add an onclick on your element)
arrowPositionPosition of the arrow pointing to the element: "top", "bottom", "left", or "right"
classNameCustom CSS class for additional styling of the step

Props

The OnboardSDK component accepts the following props:

PropTypeDescription
onCompletefunctionCallback function called when onboarding is completed
configUrlstringURL of the JSON configuration file
configString?stringJSON string containing the configuration (alternative to configUrl) and (optionnal)

Join Our Discord Community

Connect with other OnboardSDK users, get help, and stay updated on the latest features and announcements.