stepper-package
v1.0.4
Published
React js form stepper | React and tailwind
Downloads
28
Readme
Stepper Component
A customizable Stepper component built with React and styled using Tailwind CSS.
Table of Contents
- Installation
- Usage
- Props
- Contributing
- License
Installation
To install the package, run:
npm install stepper-package
Usage
Here’s an example of how to use the Stepper component in your project:
import React, { useState } from "react";
import Stepper from "stepper-package";
const App = () => {
const [currentStep, setCurrentStep] = useState(0);
const steps = ["Step 1", "Step 2", "Step 3"];
return (
<div>
<Stepper
steps={steps}
currentStep={currentStep}
onStepChange={setCurrentStep}
/>
</div>
);
};
export default App;
Props
The Stepper component accepts the following props:
steps
: An array of strings representing the steps in the stepper.currentStep
: The index of the current step.onStepChange
: A function that is called when the step changes.
Contributing
Contributions are welcome! Please feel free to submit a PR if you have any improvements or bug fixes.
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Make your changes.
- Commit your changes (git commit -m 'Add some feature').
- Push to the branch (git push origin feature-branch).
- Open a pull request.
License
This project is licensed under the MIT License - see the LICENSE file for details.