Guided tours and onboarding flows for React applications. State machine-based, fully typed, with built-in persistence.
npm install @flowsterix/core @flowsterix/react motionnpx shadcn@latest add https://flowsterix.com/r/tour-hud.jsonThis installs everything: overlay, popover, controls, progress, and step content primitives.
import { createFlow } from '@flowsterix/core'
import { StepContent, StepTitle, StepText } from '@/components/step-content'
export const onboardingFlow = createFlow({
id: 'onboarding',
version: { major: 1, minor: 0 },
autoStart: true,
steps: [
{
id: 'welcome',
target: 'screen',
advance: [{ type: 'manual' }],
content: (
<StepContent>
<StepTitle>Welcome!</StepTitle>
<StepText>Let us show you around.</StepText>
</StepContent>
),
},
{
id: 'feature',
target: { selector: '[data-tour-target="main-feature"]' },
advance: [{ type: 'event', event: 'click', on: 'target' }],
content: (
<StepContent>
<StepTitle>Try this feature</StepTitle>
<StepText>Click this button to continue.</StepText>
</StepContent>
),
},
],
})import { TourProvider } from '@flowsterix/react'
import { TourHUD } from '@/components/tour-hud'
import { onboardingFlow } from './flows'
export function App({ children }) {
return (
<TourProvider flows={[onboardingFlow]} storageNamespace="my-app">
<TourHUD />
{children}
</TourProvider>
)
}That's it. The target selector matches any element in your DOM.
Install the Flowsterix skill to help AI agents implement tours in your codebase:
npx skills kvngrf/flowsterixThe skill provides patterns for step definitions, advance rules, lifecycle hooks, router integration, and more. Works with Claude Code, Cursor, and other AI coding assistants.
Debug and manage your flows during development:
import { DevToolsProvider } from '@flowsterix/react/devtools'
export function App({ children }) {
return (
<TourProvider flows={[onboardingFlow]} storageNamespace="my-app">
<DevToolsProvider enabled={process.env.NODE_ENV === 'development'}>
<TourHUD />
{children}
</DevToolsProvider>
</TourProvider>
)
}Features:
- Steps Tab - Drag-and-drop reorder, jump to any step, track active state
- Flows Tab - View all registered flows, edit JSON state, delete flow storage
- Element Grabber - Click any element to copy its selector for step targets
- Declarative flows - Define steps with targets, content, and progression rules
- 5 advance rule types - Manual, event, delay, route, predicate
- Lifecycle hooks - onEnter, onResume, onExit for UI synchronization
- Persistence - localStorage, API, or custom storage adapters
- Versioning - Semantic versions with migration support
- Router integration - TanStack Router, React Router, Next.js App/Pages
- Accessibility - Focus trapping, keyboard navigation, ARIA labels
- Analytics hooks - Event system for integrating with your tracking
| Guide | Description |
|---|---|
| DevTools | Debug flows, manage state, capture element selectors |
| Storage Adapters | Persist state to localStorage, API, or custom backends |
| Versioning | Handle flow updates and migrations |
| Accessibility | Focus management, ARIA, reduced motion |
| Routing & Async | Router adapters, route-based steps, async targeting |
All UI components are available via the shadcn registry:
# Individual components
npx shadcn@latest add https://flowsterix.com/r/tour-provider.json
npx shadcn@latest add https://flowsterix.com/r/tour-overlay.json
npx shadcn@latest add https://flowsterix.com/r/tour-controls.json
npx shadcn@latest add https://flowsterix.com/r/tour-progress.json
# Complete HUD (recommended)
npx shadcn@latest add https://flowsterix.com/r/tour-hud.json
# Example flow
npx shadcn@latest add https://flowsterix.com/r/onboarding-flow.jsonThis repo includes example apps for different frameworks:
pnpm dev:react-vite # TanStack Router
pnpm dev:react-router # React Router v6
pnpm dev:next # Next.js App Router
pnpm dev:shadcn # shadcn component demo- Chrome/Edge 90+
- Firefox 90+
- Safari 15+
MIT
# Install dependencies
pnpm install
# Run example app
pnpm dev
# Run tests
pnpm test # Unit tests
pnpm test:e2e # Playwright E2E tests
# Build packages
pnpm build
# Lint and format
pnpm lint
pnpm format