Button

A button means an operation (or a series of operations). Clicking a button will trigger corresponding business logic.

Install

import {Button, ButtonArrow} from '@xsolla/uikit'

Examples

Primary
Secondary
Outline
      
With arrow
With icon
      
Fetching
            
Alert
Disabled
Square
   
Flatten
Icon

Usage

<Button type="button">Button label</Button>

API

To get a customized button, just set type, appearance, size, disabled, onClick.

PropertyDescriptionTypeDefault
typecan be set to button, submitstringbutton
appearancecan be set to primary, secondary, outline, flatten, square, alertstringprimary
sizecan be set to sm, md, lgstringmd
focusedset focus to buttonboolfalse
disabledset the disabled status of buttonboolfalse
reversedset the reversed position for icon and textboolfalse
fetchingset the fetching status of buttonboolfalse
onClickset the onClick handler of buttonfuncnull
iconset icon for the buttonstringnull
initialIconColorset icon color to blue, graystringblue
classNamecustom className for buttonstring
dataIdattribute for data identifierstring