"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
iconSpacingThe space between the button icon and label.
SystemProps["marginRight"]isActive
isActiveIf true, the button will be styled in its active state.
booleanisDisabled
isDisabledIf true, the button will be disabled.
booleanisLoading
isLoadingIf true, the button will show a spinner.
booleanleftIcon
leftIconIf added, the button will show an icon before the button's label.
React.ReactElementloadingText
loadingTextThe label to show in the button when isLoading is true
If no text is passed, it only shows the spinner
stringrightIcon
rightIconIf added, the button will show an icon after the button's label.
React.ReactElementsize
size"lg" | "md" | "sm" | "xs""md"spinner
spinnerReplace the spinner component when isLoading is set to true
React.ReactElementspinnerPlacement
spinnerPlacementIt 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
colorSchemeColor Schemes for ButtonGroup are not implemented in the default theme. You can extend the theme to implement them.
stringisAttached
isAttachedIf true, the borderRadius of button that are direct children will be altered
to look flushed together
booleanisDisabled
isDisabledIf true, all wrapped button will be disabled
booleansize
sizeSizes for ButtonGroup are not implemented in the default theme. You can extend the theme to implement them.
stringspacing
spacingThe spacing between the buttons
SystemProps["marginRight"]'0.5rem'variant
variantVariants for ButtonGroup are not implemented in the default theme. You can extend the theme to implement them.
stringProps#
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
iconSpacingThe space between the button icon and label.
SystemProps["marginRight"]isActive
isActiveIf true, the button will be styled in its active state.
booleanisDisabled
isDisabledIf true, the button will be disabled.
booleanisLoading
isLoadingIf true, the button will show a spinner.
booleanleftIcon
leftIconIf added, the button will show an icon before the button's label.
React.ReactElementloadingText
loadingTextThe label to show in the button when isLoading is true
If no text is passed, it only shows the spinner
stringrightIcon
rightIconIf added, the button will show an icon after the button's label.
React.ReactElementsize
size"lg" | "md" | "sm" | "xs""md"spinner
spinnerReplace the spinner component when isLoading is set to true
React.ReactElementspinnerPlacement
spinnerPlacementIt 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
colorSchemeColor Schemes for ButtonGroup are not implemented in the default theme. You can extend the theme to implement them.
stringisAttached
isAttachedIf true, the borderRadius of button that are direct children will be altered
to look flushed together
booleanisDisabled
isDisabledIf true, all wrapped button will be disabled
booleansize
sizeSizes for ButtonGroup are not implemented in the default theme. You can extend the theme to implement them.
stringspacing
spacingThe spacing between the buttons
SystemProps["marginRight"]'0.5rem'variant
variantVariants for ButtonGroup are not implemented in the default theme. You can extend the theme to implement them.
string