Use the size prop to change the size of the button. You can set the value to xs
, sm
, md
, or lg
.
You can add left and right icons to the Button component using theleftIcon
and rightIcon
props respectively.
Use the variant prop to change the visual style of the Button. You can set the value to solid
, ghost
, outline
, or link
.
You can also use icons from popular libraries like react-icons and pass it into the button.
Pass the isLoading
prop to show its loading state. By default, the button will show a spinner and leave the button's width unchanged. You can also pass the loadingText
prop to show a spinner and the loading text.
You can also change the spinner itself to use custom loaders as per your design requirements. Pass the spinner
prop and set it to a custom react element.
No flash of unstyled content, and theme is consistent between switched tabs.