material-ui

Dialog width Material UI


I am not able to increase the Dialog width in Material UI. It adds a horizontal scrollbar to Dialog. Is there any way to increase the width of Dialog in Material UI? Can anyone help?


Solution

  • Add two props fullWidth and maxWidth="md" in your Dialog component like this :

    <Dialog
      {...your_other_props}
      fullWidth
      maxWidth="sm"
    >
      {/* Your dialog content */}
    </Dialog>
    

    You can change md to sm, xs, lg and xl as per your requirement.