All Projects → saini-g → React Step Progress

saini-g / React Step Progress

Licence: mit
Dynamic multi-step progress indicator for React.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to React Step Progress

Eslint Plugin Wc
ESLint rules for Web Components
Stars: ✭ 35 (-5.41%)
Mutual labels:  hacktoberfest
Flypie
Flysystem plugin for CakePHP
Stars: ✭ 35 (-5.41%)
Mutual labels:  hacktoberfest
Merge Branch
A GitHub Action that merge PR branch to other branchs
Stars: ✭ 36 (-2.7%)
Mutual labels:  hacktoberfest
Yii2 Queue
Yii2 Queue Extension. Supports DB, Redis, RabbitMQ, Beanstalk and Gearman
Stars: ✭ 977 (+2540.54%)
Mutual labels:  hacktoberfest
Gh License
Scan your online repo, check if it is missing the license or install the Git Hooks
Stars: ✭ 35 (-5.41%)
Mutual labels:  hacktoberfest
Fabric Sdk Java
Stars: ✭ 982 (+2554.05%)
Mutual labels:  hacktoberfest
Electron Packager
Electron Packager is a command line tool and Node.js library that bundles Electron-based application source code with a renamed Electron executable and supporting files into folders ready for distribution.
Stars: ✭ 7,860 (+21143.24%)
Mutual labels:  hacktoberfest
Nvquicksite
nvQuickSite is a desktop installation app for DNN, the world's most popular ASP.NET-based CMS. This app allows you to easily install DNN onto any environment that meets the minimum system requirements for DNN to be installed.
Stars: ✭ 36 (-2.7%)
Mutual labels:  hacktoberfest
Open Oni
Open ONI (Open Online Newspaper Initiative) Django web app
Stars: ✭ 35 (-5.41%)
Mutual labels:  hacktoberfest
Laravel Weather
🌤️ A wrapper around Open Weather Map API (Current weather)
Stars: ✭ 36 (-2.7%)
Mutual labels:  hacktoberfest
Gitomatic
A tool to monitor git repositories and automatically pull & push changes
Stars: ✭ 979 (+2545.95%)
Mutual labels:  hacktoberfest
Lol Qwop
Everyone who has a merged pull request is invited to become an admin of this repo.
Stars: ✭ 35 (-5.41%)
Mutual labels:  hacktoberfest
Megadraft
Megadraft is a Rich Text editor built on top of Facebook's Draft.JS featuring a nice default base of components and extensibility
Stars: ✭ 982 (+2554.05%)
Mutual labels:  hacktoberfest
Hacktoberchallenges2018
Welcome! I need some help making my list... Learn how in the README
Stars: ✭ 35 (-5.41%)
Mutual labels:  hacktoberfest
Ns Vue Radio
A native white-label application built with NativeScript-Vue for community radios
Stars: ✭ 36 (-2.7%)
Mutual labels:  hacktoberfest
Dvc
🦉Data Version Control | Git for Data & Models | ML Experiments Management
Stars: ✭ 9,004 (+24235.14%)
Mutual labels:  hacktoberfest
Hwp.js
Open source hwp viewer and parser library powered by web technology
Stars: ✭ 980 (+2548.65%)
Mutual labels:  hacktoberfest
Hero Starter
Hero code needed to play the game.
Stars: ✭ 36 (-2.7%)
Mutual labels:  hacktoberfest
Monero Gui Guide
Guide for the Monero GUI wallet
Stars: ✭ 36 (-2.7%)
Mutual labels:  hacktoberfest
Wire Webapp
👽 Wire for web
Stars: ✭ 982 (+2554.05%)
Mutual labels:  hacktoberfest

Welcome to react-step-progress 👋

Version License: MIT

Multi step and dynamic progress indicator for react. Built using typescript, hooks and lots-o'-☕ and lots-o'-❤️ . Uses CSS modules so you don't have to worry about your CSS class names clashing with ours

React Step Progress demo

Install

npm install --save react-step-progress

Usage

NOTE: I'm working towards an implementation where you don't have to import the stylesheet explicitly. I feel like that's not an ideal solution. Feel free to help me out 😁

// import the progress bar
import StepProgressBar from 'react-step-progress';
// import the stylesheet
import 'react-step-progress/dist/index.css';

// setup the step content
const step1Content = <h1>Step 1 Content</h1>;
const step2Content = <h1>Step 2 Content</h1>;
const step3Content = <h1>Step 3 Content</h1>;

// setup step validators, will be called before proceeding to the next step
function step2Validator() {
  // return a boolean
}

function step3Validator() {
  // return a boolean
}

function onFormSubmit() {
  // handle the submit logic here
  // This function will be executed at the last step
  // when the submit button (next button in the previous steps) is pressed
}

// render the progress bar
<StepProgressBar
  startingStep={0}
  onSubmit={onFormSubmit}
  steps={[
    {
      label: 'Step 1',
      subtitle: '10%',
      name: 'step 1',
      content: step1Content
    },
    {
      label: 'Step 2',
      subtitle: '50%',
      name: 'step 2',
      content: step2Content,
      validator: step2Validator
    },
    {
      label: 'Step 3',
      subtitle: '100%',
      name: 'step 3',
      content: step3Content,
      validator: step3Validator
    }
  ]}
/>;

Available Props

Required

  • startingStep (number) - the index of the step at which to start

  • steps (ProgressStep[]) - array of steps with each step containing a label, name and content

  • onSubmit (function) - function to be executed on the last step, simulating the submit of the form

Optional

  • wrapperClass (string) - CSS class name for progress wrapper element

  • progressClass (string) - CSS class name for progress bar element

  • stepClass (string) - CSS class name for step indicator

  • labelClass (string) - CSS class name for step label

  • subtitleClass (string) - CSS class name for step subtitle

  • contentClass (string) - CSS class name for step content element

  • buttonWrapperClass (string) - CSS class name for action buttons wrapper element

  • primaryBtnClass (string) - CSS class name for primary themed button

  • secondaryBtnClass (string) - CSS class name for secondary themed button

  • previousBtnName (string) - Change the text inside the previous button

  • nextBtnName (string) - Change the text inside the next button

  • submitBtnName (string) - Change the text inside the submit button in the last step

Author

👤 Gaurav Saini

Show your support

Give a ⭐️ if this project helped you!

CONTRIBUTING & CODE OF CONDUCT

See CODE_OF_CONDUCT.md

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].