Skip to content

Getting started

Install for React

Wrap your app in PlayStepProvider; mark anchors with guideAnchor and report events with useTrack.

Terminal
npm i @axceera/playstep-react

Wrap your app once, near the root, and pass the signed-in user:

React
import { PlayStepProvider } from '@axceera/playstep-react'

export function Root() {
  const user = useCurrentUser()
  return (
    <PlayStepProvider appKey="ps_pub_dev_your_key" user={user ? { id: user.id, traits: { plan: user.plan } } : null}>
      <App />
    </PlayStepProvider>
  )
}

When user changes, PlayStep re-identifies. When it becomes null (sign-out), PlayStep forgets the user and their progress on this device.

Mark anchors

Spread guideAnchor onto the element a step points at:

React
import { guideAnchor } from '@axceera/playstep-react'

<button {...guideAnchor('new-invoice-btn')} onClick={createInvoice}>New invoice</button>

It is the same as writing data-guide="new-invoice-btn".

Report events and start guides

React
import { usePlayStep, useTrack } from '@axceera/playstep-react'

function InvoicesPage() {
  useTrack('invoice_page_opened')
  const playstep = usePlayStep()
  return <button onClick={() => playstep.start('create-first-invoice')}>Show me how</button>
}

The guide UI renders in PlayStep's own element with a shadow root, outside your React tree, so it never clashes with your components or CSS.

Every export is in the React reference.

Search the docs and guides.

Request a demo

We set up every new PlayStep workspace with its team. Leave your name and email and we'll book a demo and get you started.

We use your email only to arrange the demo. See the privacy policy.