Button

Button component is used to trigger an action or event, such as submitting a form, opening a Dialog, canceling an action, or performing a delete operation.

This component extends the Chakra UI Button

  • Button: The button component with support for custom icons, spinners, etc.
  • ButtonGroup: Used to group buttons whose actions are related, with an option to flush them together.

Button variants#

We use the variant prop to change the visual style of the Button. You can set the value to solid, rounded, ghost, outline, or link.

Shapes#

Editable Example

Solid Fill#

Editable Example

Outline#

Editable Example

States#

Editable Example

Grouping Buttons#

Editable Example

Props#

The Button extends the Chakra UI Button component so you can pass props for Button. These are props related to the Workpay Button component.

NameTypeDefaultDescription
variantoutline-rounded, solid-rounded, solid-sharpsolid-roundedThe variant of the button style to use.
isDisabledbooleanIf true, the button will be disabled.
isLoadingbooleanIf true, the button will show a spinner.
sizexs, sm, md, lgmdThe size of the button.