
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
reactjs-multi-stepper
Advanced tools
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
A lightweight, customizable, and reusable multi-stepper component for React.
It allows you to create step-based workflows such as onboarding, multi-step forms, or guided processes with ease.
npm install react-multi-stepper
# or
yarn add react-multi-stepper
import React from "react";
import { MultiStepperProvider, MultiStepper, useMultiStepper } from "react-multi-stepper";
function App() {
return (
<MultiStepperProvider steppers={[
{
id: 1,
title: "Personal Info",
description: "Enter your personal details",
children: <PersonalInfoForm />
},
{
id: 2,
title: "Address",
description: "Enter your address details",
children: <AddressForm />
},
{
id: 3,
title: "Review",
description: "Review and confirm",
children: <ReviewStep />
}
]}>
<MyMultiStepper />
</MultiStepperProvider>
);
}
function MyMultiStepper() {
const { handleNextStep, setStepStatus } = useMultiStepper();
const validateAndProceed = async () => {
// Set loading state
setStepStatus("loading");
try {
// Simulate async validation
await validateCurrentStep();
// Mark as completed and move to next
setStepStatus("completed");
handleNextStep();
} catch (error) {
// Show error state
setStepStatus("error");
}
};
return <MultiStepper onClickNext={validateAndProceed} />;
}
function ReactMultiStepper() {
const { handleNextStep, setStepStatus, currentStep } = useMultiStepper();
const validateStepContent = async () => {
setStepStatus("loading");
try {
// Custom validation based on current step
switch (currentStep) {
case 1:
await validatePersonalInfo();
break;
case 2:
await validateAddress();
break;
case 3:
await submitForm();
break;
}
setStepStatus("completed");
handleNextStep();
} catch (error) {
setStepStatus("error");
console.error("Step validation failed:", error);
}
};
return <MultiStepper onClickNext={validateStepContent} />;
}
const steppers = [
{
id: 1,
title: "Step One",
description: "Step one description",
children: (
<div className="custom-step">
<h3>Custom Step Content</h3>
<form>
<input type="text" placeholder="Enter data..." />
</form>
</div>
)
},
// ... more steps
];
Prop | Type | Required | Description |
---|---|---|---|
steppers | StepperType[] | ✅ | Array of step configurations |
children | ReactNode | ✅ | Child components that will have access to stepper context |
options | OptionsType | (Optional) Custom icons for step statuses |
Property | Type | Required | Description |
---|---|---|---|
id | number | ✅ | Unique identifier for the step |
title | string | ✅ | Step title displayed in the stepper |
description | string | ✅ | Step description or subtitle |
children | ReactNode | ✅ | Content to render for this step |
Property | Type | Required | Description |
---|---|---|---|
completedIcon | ReactNode | No | Icon to display for completed steps |
activeIcon | ReactNode | No | Icon to display for the active step |
errorIcon | ReactNode | No | Icon to display for steps in error state |
loadingIcon | ReactNode | No | Icon to display for steps in loading state |
Prop | Type | Required | Description |
---|---|---|---|
onClickNext | () => void | ✅ | Callback triggered when the "Next" button is clicked |
Method/Property | Type | Description |
---|---|---|
handleNextStep | () => void | Move to the next step |
setStepStatus | (status: StepStatus) => void | Update current step status |
currentStep | number | Current active step number |
totalSteps | number | Total number of steps |
Status | Description |
---|---|
"active" | Step is currently active and ready for user interaction |
"loading" | Step is processing/validating (shows loading indicator) |
"completed" | Step has been successfully completed |
"error" | Step has validation errors or failed processing |
FAQs
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
The npm package reactjs-multi-stepper receives a total of 77 weekly downloads. As such, reactjs-multi-stepper popularity was classified as not popular.
We found that reactjs-multi-stepper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.