Recipes / Centered Container
Centered Container
Create a centered, max-width container for reuse in multiple layouts.
Centered
First, add a container
size to your theme,
then use the size in your component definition.
// example themeexport default {sizes: {container: 768,},}
/** @jsxImportSource theme-ui */// example Container componentexport default (props) => (<div{...props}sx={{maxWidth: 'container',mx: 'auto',px: 3,}}/>)
See also: Container component