Universal style props

Mantine components accept a series of props that let us control various style aspects:

spacing

PropCSS PropertyTheme key
mmargintheme.spacing
mtmarginToptheme.spacing
mbmarginBottomtheme.spacing
mlmarginLefttheme.spacing
mrmarginRighttheme.spacing
mxmarginRight, marginLefttheme.spacing
mymarginTop, marginBottomtheme.spacing
ppaddingtheme.spacing
ptpaddingToptheme.spacing
pbpaddingBottomtheme.spacing
plpaddingLefttheme.spacing
prpaddingRighttheme.spacing
pxpaddingRight, paddingLefttheme.spacing
pypaddingTop, paddingBottomtheme.spacing

typography

PropCSS PropertyTheme key
fffontFamily
fzfontSizetheme.fontSizes
fwfontWeight
ltsletterSpacing
tatextAlign
lhlineHeighttheme.lineHeights
fsfontStyle
tttextTransform
tdtextDecoration

size

PropCSS PropertyTheme key
wwidththeme.spacing
miwminWidththeme.spacing
mawmaxWidththeme.spacing
hheighttheme.spacing
mihminHeighttheme.spacing
mahmaxHeighttheme.spacing

position

PropCSS PropertyTheme key
posposition
toptop
leftleft
bottombottom
rightright
insetinset

other props

PropCSS PropertyTheme key
displaydisplay
flexflex
bdborder
bdrsborderRadius
bgbackgroundtheme.colors
bgszbackgroundSize
bgpbackgroundPosition
bgrbackgroundRepeat
bgabackgroundAttachment
ccolortheme.colors gray.5 blue
opacityopacity

responsiveness: provide alternative values.

Instead of a single value, we provide an object with alternative values. Most of the time, we only provide two values.

  • the base value provides the mobile-centric, default value. Its exact scope depends on which other breakpoints we define.
  • The xs value activates at 576p. It excludes most smartphones. For reference, iPhones are under 450p width, with standard-size iPhones under 400p. If we want to exclude phablets as well, we use sm instead.
  • The sm value activates at 768p (48em), which excludes phablets, and includes tablets and wider screens. For reference, iPads start at 768px.
<Flex
 direction=	{{ base: 'column',sm: 'row' }}
 gap=		{{ base: 'sm', 	sm: 'lg' }}
 justify=	{{ base: 'sm', 	sm: 'lg' }}
>
earlymorning logo

© Antoine Weber 2026 - All rights reserved

Universal style props

Mantine components accept a series of props that let us control various style aspects:

spacing

PropCSS PropertyTheme key
mmargintheme.spacing
mtmarginToptheme.spacing
mbmarginBottomtheme.spacing
mlmarginLefttheme.spacing
mrmarginRighttheme.spacing
mxmarginRight, marginLefttheme.spacing
mymarginTop, marginBottomtheme.spacing
ppaddingtheme.spacing
ptpaddingToptheme.spacing
pbpaddingBottomtheme.spacing
plpaddingLefttheme.spacing
prpaddingRighttheme.spacing
pxpaddingRight, paddingLefttheme.spacing
pypaddingTop, paddingBottomtheme.spacing

typography

PropCSS PropertyTheme key
fffontFamily
fzfontSizetheme.fontSizes
fwfontWeight
ltsletterSpacing
tatextAlign
lhlineHeighttheme.lineHeights
fsfontStyle
tttextTransform
tdtextDecoration

size

PropCSS PropertyTheme key
wwidththeme.spacing
miwminWidththeme.spacing
mawmaxWidththeme.spacing
hheighttheme.spacing
mihminHeighttheme.spacing
mahmaxHeighttheme.spacing

position

PropCSS PropertyTheme key
posposition
toptop
leftleft
bottombottom
rightright
insetinset

other props

PropCSS PropertyTheme key
displaydisplay
flexflex
bdborder
bdrsborderRadius
bgbackgroundtheme.colors
bgszbackgroundSize
bgpbackgroundPosition
bgrbackgroundRepeat
bgabackgroundAttachment
ccolortheme.colors gray.5 blue
opacityopacity

responsiveness: provide alternative values.

Instead of a single value, we provide an object with alternative values. Most of the time, we only provide two values.

  • the base value provides the mobile-centric, default value. Its exact scope depends on which other breakpoints we define.
  • The xs value activates at 576p. It excludes most smartphones. For reference, iPhones are under 450p width, with standard-size iPhones under 400p. If we want to exclude phablets as well, we use sm instead.
  • The sm value activates at 768p (48em), which excludes phablets, and includes tablets and wider screens. For reference, iPads start at 768px.
<Flex
 direction=	{{ base: 'column',sm: 'row' }}
 gap=		{{ base: 'sm', 	sm: 'lg' }}
 justify=	{{ base: 'sm', 	sm: 'lg' }}
>