Skip to content
Theme UI
GitHub

Stack Layout

Add vertical space between child elements using CSS Grid.

/** @jsxImportSource theme-ui */
export default function Stack({ gap = 4, ...props }) => (
<div
{...props}
sx={{
display: 'grid',
gridGap: gap,
}}
/>
)

See also: Grid component

Edit the page on GitHub
Previous:
Tiled Layout
Next:
Flexbox Sidebar