Socket
Book a DemoInstallSign in
Socket

@stepperize/react

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stepperize/react

The library for building step-by-step workflows for web and mobile apps

3.1.0
Source
npmnpm
Version published
Weekly downloads
28K
12.11%
Maintainers
1
Weekly downloads
 
Created
Source

Stepperize Logo

Stepperize

A powerful, lightweight library for creating step-by-step workflows in React applications.

Features

  • 🚀 Fast
  • 🔥 Powerful
  • 📦 Lightweight (< 1kB gzipped)
  • 🪄 Typesafe
  • 🔗 Composable
  • 🎨 Unstyled

Installation

npm i @stepperize/react

Quick Start

  • Import the constructor:
import { defineStepper } from "@stepperize/react";
  • Define your steps:
const { Scoped, useStepper, steps } = defineStepper(
  { id: "step-1", title: "Step 1", description: "Description 1" },
  { id: "step-2", title: "Step 2", description: "Description 2" },
  { id: "step-3", title: "Step 3", description: "Description 3" },
  { id: "step-4", title: "Step 4", description: "Description 4" }
);
  • Use the hook in your components:
function MyComponent() {
  const { currentStep, nextStep, prevStep } = useStepper();
  
  return (
    <div>
      <h2>{currentStep.title}</h2>
      <p>{currentStep.description}</p>
      <button onClick={prevStep}>Previous</button>
      <button onClick={nextStep}>Next</button>
    </div>
  );
}

How It Works

Stepperize allows you to define a series of steps with unique IDs. The defineStepper function returns:

  • Scoped: A Provider component to wrap your stepper
  • useStepper: A hook to access and control the current step
  • steps: An array of the defined steps

Documentation

For detailed usage instructions and API reference, visit our documentation.

Contributing

We welcome contributions! Please open an issue or submit a pull request on our GitHub repository.

License

Stepperize is licensed under the MIT License. See the LICENSE file for details.

FAQs

Package last updated on 30 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.