0.0.9 • Published 11 months ago

stepper-react v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Stepper-React

version GitHub Workflow Status (branch) David David License Downloads

Stepper-React is a flexible, customizable step progress indicator for your React applications. It's designed to be easy to use and integrate into your projects, with a clean and modern design.

stepper-react

Features

  • Fully customizable steps
  • Responsive design
  • Easy to integrate
  • Supports both TypeScript and JavaScript
  • Lightweight: The package is designed to be lightweight and efficient, ensuring it doesn't add unnecessary bloat to your project.

Installation

You can install Stepper-React using npm:

npm install stepper-react

Usage

Here's a basic example of how to use Stepper-React:

import Stepper from 'stepper-react';

const steps = [
  {topLabel: 'Step 1', bottomLabel: 'Start', content: 'This is the first step.'},
  {topLabel: 'Step 2', bottomLabel: 'Process', content: 'This is the second step.'},
  {topLabel: 'Step 3', bottomLabel: 'Finish', content: 'This is the final step.'},
];

function App() {
  return <Stepper steps={steps} />;
}

Stepper Props

PropTypeDefaultDescription
activeStepnumber1The current active step.
stepsarray of Step objects[]The steps for the stepper. Each step is an object with topLabel, bottomLabel, and content properties.
containerWidthnumber7The width of the container.
heightforMobileStepperstring"5rem"The height for the stepper in mobile view.
topLabelFontSizestring"0.7rem"The font size of the top label.
bottomLabelFontSizestring"0.7rem"The font size of the bottom label.
contentFontSizestring"0.7rem"The font size of the content.
topLabelFontColorstring"rgb(114, 114, 114)"The color of the top label.
bottomLabelFontColorstring"rgb(114, 114, 114)"The color of the bottom label.
contentFontColorstring"rgb(114, 114, 114)"The color of the content.
stepperWrapperBackgroundColorstring"rgb(255, 255, 255)"The background color of the stepper wrapper.
stepperContentWrapperBackgroundColorstring"rgb(255, 255, 255)"The background color of the stepper content wrapper.

Each Step object in the steps array has the following properties: | Property | Type | Description | | --- | --- | --- | | topLabel | string | The top label for the step. | | bottomLabel | string | The bottom label for the step. | | content | ReactNode | The content for the step. |

Contributing

We welcome contributions!

License

Stepper-React is MIT licensed.