"whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"
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.
Props#
Button Props#
Button
composes the Box
component, so you can pass all its props. These are
props specific to the Button
component:
colorScheme
colorScheme
"gray"
iconSpacing
iconSpacing
The space between the button icon and label.
SystemProps["marginRight"]
isActive
isActive
If true
, the button will be styled in its active state.
boolean
isDisabled
isDisabled
If true
, the button will be disabled.
boolean
isLoading
isLoading
If true
, the button will show a spinner.
boolean
leftIcon
leftIcon
If added, the button will show an icon before the button's label.
React.ReactElement
loadingText
loadingText
The label to show in the button when isLoading
is true
If no text is passed, it only shows the spinner
string
rightIcon
rightIcon
If added, the button will show an icon after the button's label.
React.ReactElement
size
size
"lg" | "md" | "sm" | "xs"
"md"
spinner
spinner
Replace the spinner component when isLoading
is set to true
React.ReactElement
spinnerPlacement
spinnerPlacement
It determines the placement of the spinner when isLoading is true
"end" | "start"
"start"
variant
variant
"ghost" | "outline" | "solid" | "link" | "unstyled"
"solid"
Button Group Props#
ButtonGroup
composes the Box
component, so you can pass all its props. These
are props specific to the ButtonGroup
component:
colorScheme
colorScheme
Color Schemes for ButtonGroup
are not implemented in the default theme. You can extend the theme to implement them.
string
isAttached
isAttached
If true
, the borderRadius of button that are direct children will be altered
to look flushed together
boolean
isDisabled
isDisabled
If true
, all wrapped button will be disabled
boolean
size
size
Sizes for ButtonGroup
are not implemented in the default theme. You can extend the theme to implement them.
string
spacing
spacing
The spacing between the buttons
SystemProps["marginRight"]
'0.5rem'
variant
variant
Variants for ButtonGroup
are not implemented in the default theme. You can extend the theme to implement them.
string
Props#
Button Props#
Button
composes the Box
component, so you can pass all its props. These are
props specific to the Button
component:
colorScheme
colorScheme
"whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"
"gray"
iconSpacing
iconSpacing
The space between the button icon and label.
SystemProps["marginRight"]
isActive
isActive
If true
, the button will be styled in its active state.
boolean
isDisabled
isDisabled
If true
, the button will be disabled.
boolean
isLoading
isLoading
If true
, the button will show a spinner.
boolean
leftIcon
leftIcon
If added, the button will show an icon before the button's label.
React.ReactElement
loadingText
loadingText
The label to show in the button when isLoading
is true
If no text is passed, it only shows the spinner
string
rightIcon
rightIcon
If added, the button will show an icon after the button's label.
React.ReactElement
size
size
"lg" | "md" | "sm" | "xs"
"md"
spinner
spinner
Replace the spinner component when isLoading
is set to true
React.ReactElement
spinnerPlacement
spinnerPlacement
It determines the placement of the spinner when isLoading is true
"end" | "start"
"start"
variant
variant
"ghost" | "outline" | "solid" | "link" | "unstyled"
"solid"
Button Group Props#
ButtonGroup
composes the Box
component, so you can pass all its props. These
are props specific to the ButtonGroup
component:
colorScheme
colorScheme
Color Schemes for ButtonGroup
are not implemented in the default theme. You can extend the theme to implement them.
string
isAttached
isAttached
If true
, the borderRadius of button that are direct children will be altered
to look flushed together
boolean
isDisabled
isDisabled
If true
, all wrapped button will be disabled
boolean
size
size
Sizes for ButtonGroup
are not implemented in the default theme. You can extend the theme to implement them.
string
spacing
spacing
The spacing between the buttons
SystemProps["marginRight"]
'0.5rem'
variant
variant
Variants for ButtonGroup
are not implemented in the default theme. You can extend the theme to implement them.
string