Button

Buttons make common actions immediately visible and easy to perform with one click or tap. They can be used for any type of action, including navigation.

You can use two different looks for the button: primary and secondary. Primary is the default type, so there's no need to explicitly define it.

Example

To have an icon as button-label, just add the icon-component as children.

Example

Usage

NameTypeDescription
children (required)nodeJust text most of the time
onClickfuncCalled when the button is clicked
typeenumType of the button (deprecated)Default: 'button'
disabledboolDisable button state to indicate it's not touchableDefault: false
backgroundColorstringColor of the button, theme primary color by defaultDefault: 'purple'
colorcustomTextcolor of the button (deprecated)Default: 'white'
disabledColorstringTextcolor when button is disabled (deprecated)Default: 'darkgray'
disabledBackgroundColorstringColor when button is disabled (deprecated)Default: 'lightGray'
cssobjectPass your own css (deprecated)