# @ribrary/stepper

> A Simple react Stepper component

Latest version **0.1.1** (published 2022-10-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ribrary/stepper
pnpm add @ribrary/stepper
yarn add @ribrary/stepper
bun add @ribrary/stepper
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2022-10-13 |
| First published | 2022-10-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 18.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | rhnh |
| Maintainers | rhnh |
| Keywords | stepper, react stepper, react |

## Links

- npm: https://www.npmjs.com/package/@ribrary/stepper
- npm.io page: https://npm.io/package/@ribrary/stepper

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^18.2.0
- [@emotion/css](https://npm.io/package/@emotion/css.md) ^11.10.0
- [@emotion/styled](https://npm.io/package/@emotion/styled.md) ^11.10.4

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2022-10-13
- 0.1.0 — 2022-10-13

## README

# Introduction 
- Simple stepper for react. Which should the content step by step. 

# installation:
```shell

  npm i @ribrary/stepper 

 ```

It has four components

 - <Stepper> : the main/parent component
 - <StepperNav>  : simple navigation buttons
 - <StepperBar> :  A progress bar to show an over view 
 - <Steps> : A Container to for every step
 - <Step> : optional sub-container for <Steps> for clarity and additional feature.
 
### Basics: 
```js
  <Stepper>
    <StepperBar rgbColor="purple"/>
    <Steps>
      <Step label="Starting">One</Step>      
      <Step label="Second step">two</Step>      
      <Step label="3rd">three</Step>      
      <Step label="fourth">four</Step>      
      <Step label="fifth">five</Step>      
      <Step label="Done">six</Step>      
    </Steps>
    <StepperNav size={50} color="rgb(255, 230, 0)" limiters={true}></StepperNav>
  </Stepper>
```


# Customizing <StepperBar>
```js
<StepperBar   rgbColor="a color name in RGB", size={23} fadePercentage={23}>
```
- rgbColor: name for color button, otherwise you can change with your following css
- size: size of buttons 
- fadePercentage: fade on hover

#  Customizing <StepperNav>
```js

<StepperNav limiters={true} steps={true} rgbColor:"rgb(255,0,0)" size={40}  fadePercentage={32}/>

```

- limiters: end and start buttons
- steps: show all numerics steps
- rgbColor: color for buttons: you can over ride with your own css
- size: size of buttons 

### Using your own next and previous, without using <StepperBar> and <StepperNav>
 - NextStepButton
 - PreviousStepButton
 - CurrentStepButton

 ```js 
 import {PreviousStepButton} from "@ribrary/stepper";
  <Stepper>
    <Steps>
      <div>Hello</div>
      <div>world</div>
      <div>Bye</div>
    </Steps>
  <PreviousStepButton>
      <button>Your button Previous</button>
  </PreviousStepButton>
  <CurrentStepButton>
      <button>Current</button>
  </CurrentStepButton>
  <NextStepButton>
      <button>Your button Next</button>
  </NextStepButton>
</Stepper>

 ```
### Other Customizations
- step-buttons: for all buttons
#### css classes for <StepperNav/>
- stepper-buttons: for all buttons
- stepper-nav: for main section 
- stepper-nav--btns: for all navigation buttons
- stepper-nav--limiters: for start and end buttons 
- stepper-nav--previous: for previous button
- stepper-nav--current: for current buttons
- stepper-nav--next

#### css classes for <StepperBar/>
- stepper-buttons: for all buttons
- stepper-bar: main class for nav
- stepper-bar--btn: for all bar buttons
- stepper-bar--previous: for previous button
- stepper-bar--next: for next button

---
_Source: https://npm.io/package/@ribrary/stepper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
