Button
This is a basic button component.
Installation
Examples
Properties
title
string
The caption for the button
icon
string
Button icon. you can either use a url or fontawesome icon Here is a example for using fontawesome icons icon={'fas save'}
iconPosition
'left' | 'right'
position of the icon
className
string
Any extra css classes to add to the button
onClick
(e?: React.MouseEvent) => void
The callback that gets invoked when the button is clicked
loading
boolean
Set this to true
to show the button in its 'loading...' state. In this state, an animation will be shown indicating that work is going on and the user will not be able to click the button
loadingTitle
string
The caption to show on the button when its in loading state
active
boolean
to mark the button as active this will highlight the button
disabled
boolean
to disable the button
styles
React.CSSProperties
any custom inline styles to the button
iconStyles
React.CSSProperties
any custom inline styles for the icon container
useLoadingSpinner
boolean
show loading spinners in place of icons (even if the icon is not there it will show the spinner on the left sides) when the button is in loading state,
type
"button" | "submit" | "reset"
title
The caption for the button
string
icon
Button icon. you can either use a url or fontawesome icon
Here is a example for using fontawesome icons icon={'fas save'}
string
iconPosition
position of the icon
'left' | 'right'
className
Any extra css classes to add to the button
string
onClick
The callback that gets invoked when the button is clicked
(e?: React.MouseEvent) => void
loading
Set this to true
to show the button in its 'loading...' state. In this state, an animation will be shown indicating that work is going on and the user will not be able to click the button
boolean
loadingTitle
The caption to show on the button when its in loading state
string
active
to mark the button as active this will highlight the button
boolean
disabled
to disable the button
boolean
styles
any custom inline styles to the button
React.CSSProperties
iconStyles
any custom inline styles for the icon container
React.CSSProperties
useLoadingSpinner
show loading spinners in place of icons (even if the icon is not there it will show the spinner on the left sides) when the button is in loading state,
boolean
type
"button" | "submit" | "reset"
Last updated