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.
Name | Type | Default | Description |
---|---|---|---|
variant | outline-rounded , solid-rounded , solid-sharp | solid-rounded | The variant of the button style to use. |
isDisabled | boolean | If true , the button will be disabled. | |
isLoading | boolean | If true , the button will show a spinner. | |
size | xs , sm , md , lg | md | The size of the button. |