material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[material-ui][Button] Button doesn't have the loading props

Open gtanchak opened this issue 8 months ago • 20 comments

Summary

Add loading Prop to MUI Button Component

Currently, the MUI library offers a LoadingButton component within the @mui/lab package to manage loading states. However, this requires an additional dependency, which might be an overhead for projects where the only use case is managing a loading state for buttons.

Feature Request: To enhance the usability and convenience of the MUI Button component, I propose adding a isLoading prop directly to the existing MUI Button component in the @mui/material package. This addition would streamline the process of managing loading states without requiring the installation of another dependency.

Examples

<Button isLoading={true}>Submit</Button>

Motivation

  1. Reduces Dependencies: Avoid the need for installing the @mui/lab package just for the loading button functionality.
  2. Improves User Experience: Provides a straightforward way to manage loading states for buttons, improving the developer experience.

Search keywords: Button doesn't have the isLoading Props

gtanchak avatar Jun 19 '24 08:06 gtanchak