Stepperize: A Type-Safe Library for Building Step-by-Step Workflows

Summary
Stepperize is a powerful and flexible TypeScript library designed for creating type-safe, step-by-step workflows in web and mobile applications. It offers a composable architecture and is unstyled, allowing for maximum customization to fit any project's design needs. With its lightweight and efficient design, Stepperize simplifies the development of complex multi-step processes.
Repository Info
Tags
Click on any tag to explore related repositories
Introduction
Stepperize is a robust and type-safe TypeScript library crafted by damianricobelli, designed to streamline the creation of step-by-step workflows in your applications. Whether you're building for the web with React or mobile with React Native, Stepperize provides a flexible and unstyled foundation, ensuring full control over your UI while maintaining strong type safety. It's an ideal solution for implementing guided processes, onboarding flows, or multi-stage forms.
For more details, visit the official GitHub repository: damianricobelli/stepperize
Installation
Getting started with Stepperize is straightforward. You can install it using npm:
npm install @stepperize/react
Examples
Stepperize offers a simple yet powerful API for defining and managing your workflow steps. Here's a quick example to illustrate its usage:
First, import defineStepper and define your steps:
import { defineStepper } from "@stepperize/react";
const { Scoped, useStepper, steps, utils } = defineStepper(
{ id: "step-1", title: "Step 1", description: "Description for step 1" },
{ id: "step-2", title: "Step 2", description: "Description for step 2" },
{ id: "step-3", title: "Step 3", description: "Description for step 3" },
{ id: "step-4", title: "Step 4", description: "Description for step 4" }
);
Then, use the useStepper hook within your React components to control and display the current step:
function StepperComponent() {
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>
);
}
Why use Stepperize?
Stepperize stands out for several key reasons, making it an excellent choice for managing complex workflows:
- Fast and efficient: Optimized for performance, ensuring smooth user experiences.
- Powerful and flexible: Provides a robust API that can adapt to various workflow requirements.
- Lightweight: Minimal bundle size, reducing the overhead on your application.
- Fully type-safe: Built with TypeScript, offering excellent developer experience with compile-time checks and autocompletion.
- Composable architecture: Designed for modularity, allowing you to build complex flows from simpler, reusable parts.
- Unstyled for maximum customization: Gives you complete control over the visual presentation, integrating seamlessly with any design system, including Shadcn UI.
Links
Explore Stepperize further through these official resources: