Skip to main content

Position Props

Position props control element positioning and z-index.

Available Props

PropCSS PropertyTheme Key
positionpositionnone
zIndexz-indexzIndices
toptopspace
rightrightspace
bottombottomspace
leftleftspace

Theme Scales

{
zIndices: {
hide: -1,
auto: 'auto',
base: 0,
docked: 10,
dropdown: 1000,
sticky: 1100,
banner: 1200,
overlay: 1300,
modal: 1400,
popover: 1500,
tooltip: 1600,
},
space: {
// ... same as space scale
}
}

Usage

<Box
position="absolute"
top={0}
right={0}
zIndex="overlay"
/>

// Fixed position example
<Box
position="fixed"
bottom={4}
right={4}
zIndex="tooltip"
/>