Trigger an action or event, such as submitting a form or displaying a dialog.
This component is based on the button element and supports common margin props.
Use the size prop to control the size of the button.
Use the variant prop to control the visual style of the button.
Use the ghost variant to display a button without chrome. Ghost buttons behave like text in layout, as they use a negative margin to optically align themselves against their siblings while maintaining the padding in active and hover states.
Use the color prop to assign a specific color.
Use the highContrast prop to increase color contrast with the background.
Use the radius prop to assign a specific radius value.
You can nest icons directly inside the button. An appropriate gap is provided automatically.
Use the loading prop to display a loading spinner in place of button content, preserving the original size of the button in its normal state. The button will be disabled while loading.
If you have an icon inside the button, you can use the button’s disabled state and wrap the icon in a standalone Spinner to achieve a more sophisticated design.