@ndozhh/stepper-js
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    Stepper-js

    Stepper-js is a little hook that provides everything you need to build an awesome stepper component or any step-by-step guided flow in React.
    Explore the API »

    Installation

    Install the NPM package:

    1. Using yarn
      yarn add @ndozhh/stepper-js
    2. Using npm
      npm install @ndozhh/stepper-js

    Usage

    This example is built using MUI components

    Stepper-js example


    See the example code here

    API

    Property Type Description
    currentStep number Current step of the stepper (zero based)
    isFirstStep boolean Indicates whether the stepper is in the first step
    isLastStep boolean Indicates whether the stepper is in the last step
    isFinished boolean Indicates whether the stepper is completed
    isCurrentStep (stepIndex: number) => boolean Check if a given index is the current step
    isStepCompleted (stepIndex: number) => boolean Check if a given index has been completed
    isStepSkipped (stepIndex: number) => boolean Check if a given index has been skipped
    onNext () => void Go to the next step
    onPrevious () => void Go to the previous step
    onStep (stepIndex: number) => void Go to the provided step
    onSkip (stepIndex: number) => void Skip the given step
    onReset () => void Reset the stepper to its initial state


    License

    Distributed under the MIT License. See LICENSE for more information.

    Contact

    Juan David 👨🏻‍💻

    Install

    npm i @ndozhh/stepper-js

    DownloadsWeekly Downloads

    4

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    19.2 kB

    Total Files

    9

    Last publish

    Collaborators

    • ndozhh