The below codes are editable and you can modify them the way you want directly from your browser, please use the green button or the ctrl + s to save the changes.
Demo Copy Saved
1
2 import MDButton from "components/MDButton" ;
3
4 < MDButton > Button</ MDButton > Props Information Name Type Default Description variant 'text' 'contained' 'outlined' 'gradient' contained Change the MDButton
background color type. size 'small' 'medium' 'large' medium Change the MDButton
size. color 'primary' 'secondary' 'info' 'success' 'warning' 'error' 'light' 'dark' 'white' white Change the MDButton
background color. circular bool false If true
the MDButton
get a rounded or circular shape. iconOnly bool false If true
the MDButton
will have same width
andheight
values, its useful when using only icon inside the MDButton
component. children* node Use to pass node or content inside the MDButton
, its the only required prop. MUI Props You can pass all of the MUI Button props for the MDButton
as well.
Variants Button
Button
Button
Button
Copy Saved
1
2 import MDButton from "components/MDButton" ;
3
4 < MDButton variant = " text" color = " info" > Button</ MDButton >
5 < MDButton variant = " contained" color = " info" > Button</ MDButton >
6 < MDButton variant = " outlined" color = " info" > Button</ MDButton >
7 < MDButton variant = " gradient" color = " info" > Button</ MDButton > Sizes Copy Saved
1
2 import MDButton from "components/MDButton" ;
3
4 < MDButton variant = " gradient" color = " info" size = " small" > Button</ MDButton >
5 < MDButton variant = " gradient" color = " info" size = " medium" > Button</ MDButton >
6 < MDButton variant = " gradient" color = " info" size = " large" > Button</ MDButton > With Icon
favorite
Button
Button
favorite
favorite
favorite
Copy Saved
1
2 import MDButton from "components/MDButton" ;
3
4
5 import Icon from "@mui/material/Icon" ;
6
7 < MDButton variant = " gradient" color = " info" >
8 < Icon > favorite</ Icon >
9 Button
10 </ MDButton >
11
12 < MDButton variant = " gradient" color = " info" >
13 Button
14 < Icon > favorite</ Icon >
15 </ MDButton >
16
17 < MDButton variant = " gradient" color = " info" >
18 < Icon > favorite</ Icon >
19 </ MDButton >
20
21 < MDButton variant = " gradient" color = " info" iconOnly >
22 < Icon > favorite</ Icon >
23 </ MDButton > Block Copy Saved
1
2 import MDButton from "components/MDButton" ;
3
4 < MDButton variant = " gradient" color = " info" fullWidth > Button</ MDButton >