
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
react-simple-step-wizard
Advanced tools
A simple and composable step wizard in React!
Click here to see a live demo!
npm install -S react-simple-step-wizard
import React, { Component } from 'react';
import Wizard from 'react-simple-step-wizard';
const Step1 = () => <div>This is Step 1</div>;
const Step2 = () => <div>This is Step 2</div>;
const Step3 = () => <div>This is Step 3</div>;
const Step4 = () => <div>This is Step 4</div>;
const Step5 = () => <div>This is Step 5</div>;
const MyStepStracker = ({ currentStep = 0, steps = [] }) => (
<div>
<p>Current step is: {steps[currentStep]}</p>
</div>
);
const MyNavigator = ({
isNextAvailable,
isPrevAvailable,
nextStep,
prevStep,
}) => (
<div>
{isPrevAvailable && (
<button type="button" onClick={prevStep}>
< Back
</button>
)}
{isNextAvailable && (
<button type="button" onClick={nextStep}>
Next >
</button>
)}
</div>
);
class App extends Component {
handleStepChange = currentStep => {
console.log(currentStep);
};
render() {
return (
<div>
<h1>react-simple-step-wizard demo</h1>
<Wizard onStepChange={this.handleStepChange}>
<Wizard.StepTracker />
<Wizard.Steps>
<Step1 stepLabel="Search" />
<Step2 stepLabel="Select" />
<Step3 stepLabel="Customize" />
<Step4 stepLabel="Review" />
<Step5 stepLabel="Submit" />
</Wizard.Steps>
{/* You can implement your custom components via render-props */}
<Wizard.StepTracker>
{stepTrackerProps => <MyStepStracker {...stepTrackerProps} />}
</Wizard.StepTracker>
<Wizard.Navigator>
{navigatorProps => <MyNavigator {...navigatorProps} />}
</Wizard.Navigator>
</Wizard>
</div>
);
}
}
export default App;
Provide an accessible and composable API to be used with older react versions that don't support hooks.
Rewrite lib core and expose some of the APIs using react hooks.
MIT © jonathanpalma
FAQs
React simple step wizard
The npm package react-simple-step-wizard receives a total of 80 weekly downloads. As such, react-simple-step-wizard popularity was classified as not popular.
We found that react-simple-step-wizard demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.