The Button component is used for any action or to trigger something. Ideally a button would fire a function or complete an action, rather than be used as a link.
size prop to change the size of the button. You can set the value to
lg. Default value is
mode prop to change the visual style of the Button. You can set the
isLoading prop to the Button component to show it's loading state. You
can optionally pass
loadingText prop, if you do, the button will show a
spinner and the loading text. Otherwise, the button will take the width of the
text label and show only the spinner
- Button has
- When Button has focus, Space and Enter activates it.
Button composes Box and all props you pass (mode, bg, color, etc.) are converted to style props. This means you can override any style of the Button via props.
In event you need to make your own custom button, you can leverage the
Box component. It provides the
style props to style the button.
The Button composes the
Box component so you can pass props for
Box. These are props related to the Button component.
|The label of the button|
|The label to show in the button when |
|The variant of the button style to use.|
|The size of the button.|