Skip to main content

Layout Props

Layout props control width, height, display, and other layout-related CSS properties. Many values reference the theme's sizes scale.

Available Props

PropCSS PropertyTheme Key
widthwidthsizes
heightheightsizes
minWidthmin-widthsizes
maxWidthmax-widthsizes
minHeightmin-heightsizes
maxHeightmax-heightsizes
sizewidth, heightsizes
displaydisplaynone
overflowoverflownone
overflowXoverflow-xnone
overflowYoverflow-ynone

Theme Scale

// Default sizes scale in theme
{
sizes: {
xs: '20rem', // 320px
sm: '30rem', // 480px
md: '48rem', // 768px
lg: '62rem', // 992px
xl: '80rem', // 1280px
'2xl': '96rem', // 1536px
full: '100%',
half: '50%',
}
}

Usage

<Box 
width="sm" // width: 30rem
maxWidth="full" // max-width: 100%
height={300} // height: 300px
overflow="auto" // overflow: auto
/>