1.0.1 • Published 8 years ago

react-stepform v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

React Step Form

This component is used to handle the flow between pages and allows for easy, yet controlled navigation between them. The step form does not provide previous/next buttons on each page, but instead provides several context functions for manipulating the current page.

Installation

npm install react-stepform

Usage

See example

Properties

PropDefaultTypeDescription
currentPage0IntegerCan be set initially to be the landing page. This will also modify the current page if changed.
transitionNamestepStringUsed for css transition effect with ReactCSSTransitionGroup
transitionTiming500, 300ArrayEnter timeout and leave timeout for ReactCSSTransitionGroup
pageOrderorder of childrenArrayArray of integers indicating order in which the pages should display
pageTitlesnullArrayArray of page names to be used in the form control section
onPageChangenullFunctionFunction that is fired when the page changes via any catalyst
onFinishnullFunctionFunction that is fired when nextPage cannot fire because last page is active
classNamenullStringAppended to component class list

Context

ContextTypeDescription
nextPageFunctionMove to the next page
previousPageFunctionMove to the previous page
setPageFunctionMove to specific page