Grid API
Demos
For examples and details on the usage of this React component, visit the component demo pages:
Import
import Grid from '@mui/system/Unstable_Grid/Grid.tsx/Grid';
// or
import { Grid } from '@mui/system/Unstable_Grid/Grid.tsx';Props
Props of the native component are also available.
| Name | Type | Description | 
|---|---|---|
| children | node | The content of the component. | 
| columns | Array<number> | number | object | The number of columns. | 
| columnSpacing | Array<number | string> | number | object | string | Defines the horizontal space between the type  itemcomponents. It overrides the value of thespacingprop. | 
| container | bool | If  true, the component will have the flex container behavior. You should be wrapping items with a container. | 
| direction | 'column-reverse' | 'column' | 'row-reverse' | 'row' | Array<'column-reverse' | 'column' | 'row-reverse' | 'row'> | object | Defines the  flex-directionstyle property. It is applied for all screen sizes. | 
| disableEqualOverflow | bool | If  true, the negative margin and padding are apply only to the top and left sides of the grid. | 
| lg | 'auto' | number | bool | If a number, it sets the number of columns the grid item uses. It can't be greater than the total number of columns of the container (12 by default). If 'auto', the grid item's width matches its content. If false, the prop is ignored. If true, the grid item's width grows to use the space available in the grid container. The value is applied for the  lgbreakpoint and wider screens if not overridden. | 
| lgOffset | 'auto' | number | If a number, it sets the margin-left equals to the number of columns the grid item uses. If 'auto', the grid item push itself to the right-end of the container. The value is applied for the  lgbreakpoint and wider screens if not overridden. | 
| md | 'auto' | number | bool | If a number, it sets the number of columns the grid item uses. It can't be greater than the total number of columns of the container (12 by default). If 'auto', the grid item's width matches its content. If false, the prop is ignored. If true, the grid item's width grows to use the space available in the grid container. The value is applied for the  mdbreakpoint and wider screens if not overridden. | 
| mdOffset | 'auto' | number | If a number, it sets the margin-left equals to the number of columns the grid item uses. If 'auto', the grid item push itself to the right-end of the container. The value is applied for the  mdbreakpoint and wider screens if not overridden. | 
| rowSpacing | Array<number | string> | number | object | string | Defines the vertical space between the type  itemcomponents. It overrides the value of thespacingprop. | 
| sm | 'auto' | number | bool | If a number, it sets the number of columns the grid item uses. It can't be greater than the total number of columns of the container (12 by default). If 'auto', the grid item's width matches its content. If false, the prop is ignored. If true, the grid item's width grows to use the space available in the grid container. The value is applied for the  smbreakpoint and wider screens if not overridden. | 
| smOffset | 'auto' | number | If a number, it sets the margin-left equals to the number of columns the grid item uses. If 'auto', the grid item push itself to the right-end of the container. The value is applied for the  smbreakpoint and wider screens if not overridden. | 
| spacing | Array<number | string> | number | object | string | Defines the space between the type  itemcomponents. It can only be used on a typecontainercomponent. | 
| wrap | 'nowrap' | 'wrap-reverse' | 'wrap' | Defines the  flex-wrapstyle property. It's applied for all screen sizes. | 
| xl | 'auto' | number | bool | If a number, it sets the number of columns the grid item uses. It can't be greater than the total number of columns of the container (12 by default). If 'auto', the grid item's width matches its content. If false, the prop is ignored. If true, the grid item's width grows to use the space available in the grid container. The value is applied for the  xlbreakpoint and wider screens if not overridden. | 
| xlOffset | 'auto' | number | If a number, it sets the margin-left equals to the number of columns the grid item uses. If 'auto', the grid item push itself to the right-end of the container. The value is applied for the  xlbreakpoint and wider screens if not overridden. | 
| xs | 'auto' | number | bool | If a number, it sets the number of columns the grid item uses. It can't be greater than the total number of columns of the container (12 by default). If 'auto', the grid item's width matches its content. If false, the prop is ignored. If true, the grid item's width grows to use the space available in the grid container. The value is applied for all the screen sizes with the lowest priority. | 
| xsOffset | 'auto' | number | If a number, it sets the margin-left equals to the number of columns the grid item uses. If 'auto', the grid item push itself to the right-end of the container. The value is applied for the  xsbreakpoint and wider screens if not overridden. | 
As a CSS utility, the Grid component also supports all
system properties. You can use them as props directly on the component.The
ref is forwarded to the root element.Theme default props
You can useMuiGrid to change the default props of this component with the theme.