Skip to content

LoadingButton API

API reference docs for the React LoadingButton component. Learn about the props, CSS, and other APIs of this exported module.

Demos

For examples and details on the usage of this React component, visit the component demo pages:

Import

import LoadingButton from '@mui/lab/LoadingButton';
// or
import { LoadingButton } from '@mui/lab';
Learn about the difference by reading this guide on minimizing bundle size.

Props

Props of the Button component are also available.

children

classes

disabled

loading

loadingIndicator

loadingPosition

sx

variant

The ref is forwarded to the root element.

Inheritance

While not explicitly documented above, the props of the Button component are also available in LoadingButton. You can take advantage of this to target nested components.


Theme default props

You can use MuiLoadingButton to change the default props of this component with the theme.


CSS

The following class names are useful for styling with CSS (the state classes are marked).
To learn more, visit the component customization page.

.MuiLoadingButton-root

.MuiLoadingButton-text

.MuiLoadingButton-textInherit

.MuiLoadingButton-textPrimary

.MuiLoadingButton-textSecondary

.MuiLoadingButton-textSuccess

.MuiLoadingButton-textError

.MuiLoadingButton-textInfo

.MuiLoadingButton-textWarning

.MuiLoadingButton-outlined

.MuiLoadingButton-outlinedInherit

.MuiLoadingButton-outlinedPrimary

.MuiLoadingButton-outlinedSecondary

.MuiLoadingButton-outlinedSuccess

.MuiLoadingButton-outlinedError

.MuiLoadingButton-outlinedInfo

.MuiLoadingButton-outlinedWarning

.MuiLoadingButton-contained

.MuiLoadingButton-containedInherit

.MuiLoadingButton-containedPrimary

.MuiLoadingButton-containedSecondary

.MuiLoadingButton-containedSuccess

.MuiLoadingButton-containedInfo

.MuiLoadingButton-containedError

.MuiLoadingButton-containedWarning

.MuiLoadingButton-disableElevation

.Mui-focusVisibleSTATE

.Mui-disabledSTATE

.MuiLoadingButton-colorInherit

.MuiLoadingButton-textSizeSmall

.MuiLoadingButton-textSizeMedium

.MuiLoadingButton-textSizeLarge

.MuiLoadingButton-outlinedSizeSmall

.MuiLoadingButton-outlinedSizeMedium

.MuiLoadingButton-outlinedSizeLarge

.MuiLoadingButton-containedSizeSmall

.MuiLoadingButton-containedSizeMedium

.MuiLoadingButton-containedSizeLarge

.MuiLoadingButton-sizeSmall

.MuiLoadingButton-sizeMedium

.MuiLoadingButton-sizeLarge

.MuiLoadingButton-fullWidth

.MuiLoadingButton-startIcon

.MuiLoadingButton-endIcon

.MuiLoadingButton-iconSizeSmall

.MuiLoadingButton-iconSizeMedium

.MuiLoadingButton-iconSizeLarge

.MuiLoadingButton-loading

.MuiLoadingButton-loadingIndicator

.MuiLoadingButton-loadingIndicatorCenter

.MuiLoadingButton-loadingIndicatorStart

.MuiLoadingButton-loadingIndicatorEnd

.MuiLoadingButton-endIconLoadingEnd

.MuiLoadingButton-startIconLoadingStart


You can override the style of the component using one of these customization options: