npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-stepflow

v0.0.3

Published

An onboarding component for react, with a simple and easy to use API and a set of built-in components.

Downloads

8

Readme

React StepFlow

An onboarding component for react, with a simple and easy to use API and a set of built-in components.

NPM Version License: MIT TypeScript

Features

🎨 Fully customizable UI components
🔄 Smooth animations powered by Framer Motion
🌗 Dark/Light theme support built-in
📱 Mobile-first responsive design
⚡ Zero-config Tailwind CSS integration
✨ Type-safe with full TypeScript support

Installation

npm install react-stepflow

Peer Dependencies

{
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
  "framer-motion": "^10.12.16",
  "lucide-react": "^0.244.0",
  "clsx": "^1.2.1",
  "tailwind-merge": "^1.12.0"
}

Quick Start

import {
  OnboardingProvider,
  OnboardingStep,
  OnboardingHeader,
  OnboardingStepIndicator,
} from "react-stepflow";
import "react-stepflow/index.css";

function App() {
  const steps: OnboardingStep[] = [
    { id: 1, component: <Welcome /> },
    { id: 2, component: <Setup /> },
    { id: 3, component: <Complete /> },
  ];

  return (
    <OnboardingProvider stepsCount={steps.length}>
      <div className="flex flex-col gap-4">
        <OnboardingHeader title="Welcome" />
        <OnboardingStepIndicator totalSteps={steps.length} />
        <OnboardingSteps steps={steps} />
      </div>
    </OnboardingProvider>
  );
}

Components API

OnboardingProvider

Root component that provides onboarding context.

| Prop | Type | Default | Description | | ------------ | ----------- | ------------ | -------------------------------- | | children | ReactNode | required | Child components | | stepsCount | number | required | Total number of onboarding steps |

OnboardingSteps

Container component with animation support.

| Prop | Type | Default | Description | | ------------------------- | ------------------- | ------------ | ------------------------- | | steps | OnboardingStep[] | required | Array of step components | | customAnimationConfig | AnimationConfig | optional | Custom animation settings | | customAnimationVariants | AnimationVariants | optional | Custom animation variants |

OnboardingStepIndicator

Progress indicator component.

| Prop | Type | Default | Description | | ----------------------- | ----------------- | ------------ | ------------------------- | | totalSteps | number | required | Total number of steps | | className | string | optional | Custom container class | | customAnimationConfig | AnimationConfig | optional | Custom animation settings |

Button

Customizable button component.

| Prop | Type | Default | Description | | ---------- | -------------------------------------------------- | ----------- | -------------------- | | variant | 'primary' \| 'secondary' \| 'outline' \| 'ghost' | 'primary' | Button style variant | | size | 'sm' \| 'md' \| 'lg' | 'md' | Button size | | loading | boolean | false | Loading state | | disabled | boolean | false | Disabled state |

Input

Form input component with validation.

| Prop | Type | Default | Description | | -------------- | --------- | -------- | ------------------------ | | label | string | optional | Input label | | required | boolean | false | Required field indicator | | errorMessage | string | optional | Validation error message |

TextLabel

Label text component.

| Prop | Type | Default | Description | | ----------- | -------- | ------------ | ------------ | | text | string | required | Label text | | className | string | optional | Custom class |

Checkbox

Custom checkbox component.

| Prop | Type | Default | Description | | ---------- | ---------------------------- | ------------ | -------------- | | name | string | required | Checkbox name | | checked | boolean | required | Checked state | | onChange | (checked: boolean) => void | required | Change handler | | children | ReactNode | required | Label content |

Dropdown

Customizable dropdown component.

| Prop | Type | Default | Description | | ----------- | ------------------------------------------ | ------------ | ---------------- | | value | string \| null | required | Selected value | | setValue | Dispatch<SetStateAction<string \| null>> | required | Value setter | | children | ReactNode | required | Dropdown content | | className | string | optional | Custom styling |

FormField

Base form field wrapper component.

| Prop | Type | Default | Description | | ---------------- | --------- | ------------ | ------------------------ | | label | string | required | Field label | | id | string | optional | Input element ID | | className | string | optional | Container class | | inputClassName | string | optional | Input element class | | labelClassName | string | optional | Label element class | | required | boolean | false | Required field indicator | | errorMessage | string | optional | Validation error message |

Spinner

Loading spinner component.

| Prop | Type | Default | Description | | ----------- | -------- | -------- | -------------------- | | className | string | optional | Custom styling class |

Default styling includes:

  • Animated spinning effect
  • Responsive sizing (w-5 h-5)
  • Semi-transparent appearance
  • Current color inheritance

Extras

For the components like that can't be targetted direcly, I've provided classnames to target them

  • OnboardingStepDivider: onboarding-divider-outer and onboarding-divider-inner
  • OnboardingStepCircle: onboarding-step-circle

Animation Types

AnimationConfig

| Property | Type | Default | Description | | ----------- | ---------------------------- | -------------- | ------------------- | | duration | number | 0.3 | Animation duration | | ease | string | 'easeInOut' | Easing function | | direction | 'horizontal' \| 'vertical' | 'horizontal' | Animation direction |

AnimationVariants

| Property | Type | Description | | --------- | ------------------- | ------------------------ | | initial | AnimationProperty | Starting animation state | | animate | AnimationProperty | Active animation state | | exit | AnimationProperty | Exit animation state |

Hook APIs

useOnboarding

| Property | Type | Description | | ------------- | ------------------------ | --------------------- | | currentStep | number | Current active step | | totalSteps | number | Total number of steps | | next | () => void | Go to next step | | prev | () => void | Go to previous step | | goToStep | (step: number) => void | Go to specific step |

Types API

OnboardingStep

| Property | Type | Description | | ----------- | ----------- | ---------------------- | | id | number | Unique step identifier | | component | ReactNode | Step content component |

AnimationConfig

| Property | Type | Description | | ----------- | ---------------------------- | ------------------- | | duration | number | Animation duration | | ease | string | Easing function | | direction | 'horizontal' \| 'vertical' | Animation direction |

AnimationProperty

| Property | Type | Description | | --------- | -------- | ------------------ | | opacity | number | Opacity value | | x | number | X-axis translation | | y | number | Y-axis translation |

AnimationVariants

| Property | Type | Description | | --------- | ------------------- | --------------- | | initial | AnimationProperty | Initial state | | animate | AnimationProperty | Animation state | | exit | AnimationProperty | Exit state |

ButtonProps

| Property | Type | Description | | --------- | -------------------------------------------------- | ------------- | | variant | 'primary' \| 'secondary' \| 'outline' \| 'ghost' | Button style | | size | 'sm' \| 'md' \| 'lg' | Button size | | loading | boolean | Loading state |

FormFieldProps

| Property | Type | Description | | ---------------- | -------- | ------------------- | | label | string | Field label | | className | string | Container class | | inputClassName | string | Input element class | | labelClassName | string | Label element class | | errorMessage | string | Error message |

CheckboxProps

| Property | Type | Description | | ----------- | ---------------------------- | -------------- | | name | string | Checkbox name | | children | ReactNode | Label content | | checked | boolean | Checked state | | onChange | (checked: boolean) => void | Change handler | | className | string | Custom class |

OnboardingContextValue

| Property | Type | Description | | ------------- | ------------------------ | ---------------------- | | currentStep | number | Current step index | | totalSteps | number | Total steps count | | next | () => void | Next step function | | prev | () => void | Previous step function | | goToStep | (step: number) => void | Go to step function |

DropdownProps

| Property | Type | Description | | ----------- | ----------- | ---------------- | | children | ReactNode | Dropdown content | | className | string | Custom class |

TextLabelProps

| Property | Type | Description | | ----------- | -------- | ------------ | | text | string | Label text | | className | string | Custom class |

Styling

The package uses Tailwind CSS for styling.
Import import "react-stepflow/index.css"; into your app component.

Browser Support

  • Chrome (latest 3 versions)
  • Firefox (latest 3 versions)
  • Safari (latest 2 versions)
  • Edge (latest 3 versions)

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Created by David Jaja