The button component supports the four global variants: solid (default), soft, outlined and plain. Choose one of them depending on the button's action importance.
Use the startDecorator and/or endDecorator props to add supporting decorators to the button.
<ButtonstartDecorator={<Add/>}>Add to cart</Button><Buttonaria-label="Like"variant="outlined"color="neutral"><ThumbUp/></Button><Buttonvariant="soft"endDecorator={<KeyboardArrowRight/>}color="success">
Checkout
</Button>
Press Enter to start editing
Icon button
Use the IconButton component if you want width and height to be the same while not having a label. Every prop previously covered are available for this component as well.
You can also use the button component as a link by assigning a value of a to the component prop. Since links are the most appropriate component for navigating through pages, that's useful when you want the same button design for a link.
Doing so will automatically change the rendered HTML tag from <button> to <a>.
<Buttoncomponent="a"href="#as-link"startDecorator={<OpenInNew/>}>
Open innewtab</Button><IconButtonaria-label="Open in new tab"component="a"href="#as-link"><OpenInNew/></IconButton>
Press Enter to start editing
CSS Variables
<ButtonstartDecorator={<FavoriteBorder/>}>
CSS Variables
px
<IconButton><FavoriteBorder/></IconButton>
CSS Variables
px
Unstyled
The component also comes with an unstyled version. It's ideal for doing heavy customizations and minimizing bundle size.