Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dialog width material-ui next

Tags:

material-ui

I am not able to increase the Dialog width in material-ui next. it adds horizontal scrollbar to Dailog. is there any way to increase width of Dailog in material-ui next? Can any on help?

like image 321
Siddu h Avatar asked Nov 08 '17 13:11

Siddu h


People also ask

How do I change the position of material UI's dialog?

To change the position of a React Material UI dialog, we call makeStyles to return classes with the styles we want. to call makeStyles with an object to create the dialog class with the dialog styles inside. Then we call useStyles returned from makeStyles to return the classes object.

How do you style dialog in material UI?

Customized Dialogs We create a styles function that we pass into the withStyles higher-order components with various styles. We moved the close button by setting some styles for the closeButton class. To create the DialogTitle component, we passed a component that uses the classes and children from the props.


1 Answers

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.

like image 136
Siddu h Avatar answered Oct 05 '22 03:10

Siddu h