React Button Loader
React button with loader feature.
Install
npm install react_button_loader --save
Demo

Usage Example
React default button loader
; { super; thisstate = toggleLoader: false ; } { return <ButtonLoader isLoading=thisstatetoggleLoader // Toggle loader (true/false) onClick= this > Click Me </ButtonLoader> ; }
Demo

Usage Example
React custom button loader
; { super; thisstate = toggleLoader: false ; } { return <ButtonLoader width="100px" height="35px" background="#6f42c1" isLoading=thisstatetoggleLoader // Toggle loader (true/false) onClick= this > Click Me </ButtonLoader> ; }
Demo

Usage Example
; { super; thisstate = toggleLoader: false ; } { return <ButtonLoader isLoading=thisstatetoggleLoader background="#c93b3b" loaderType= 'bouncing-ball' onClick= { this } > Click Me </ButtonLoader> ; }
Demo

Usage Example
; { super; thisstate = toggleLoader: false ; } { return <ButtonLoader isLoading=thisstatetoggleLoader background="#42b5c1" loaderType= 'jiggling-lines' onClick= { this } > Click Me </ButtonLoader> ; }
PROPTYPES
Prop | Type | Default |
---|---|---|
isLoading | Boolean | true |
disabled | Boolean | false |
width | String | '125px' |
height | String | '35px' |
loaderType | String | 'spinner' |
background | String | '#22b686' |
onClick | Function | () => null |