Common Props

Bridge uses styled-system to add sets of styling props to components. This enables ease of styling via props. For additional information on their styling props, check their reference table

There are a couple common styling prop groups that components may have.

COMMON

the COMMON common prop group is enabled in most components. This group of props includes styling for layout, spacing, and colors.

PropCSS PropertyTheme Field
m, marginmarginspace
mt, marginTopmargin-topspace
mr, marginRightmargin-rightspace
mb, marginBottommargin-bottomspace
ml, marginLeftmargin-leftspace
mx, marginXmargin-left and margin-rightspace
my, marginYmargin-top and margin-bottomspace
p, paddingpaddingspace
pt, paddingToppadding-topspace
pr, paddingRightpadding-rightspace
pb, paddingBottompadding-bottomspace
pl, paddingLeftpadding-leftspace
px, paddingXpadding-left and padding-rightspace
py, paddingYpadding-top and padding-bottomspace
widthwidthsizes
heightheightsizes
minWidthmin-widthsizes
maxWidthmax-widthsizes
minHeightmin-heightsizes
maxHeightmax-heightsizes
sizewidth heightsizes
displaydisplaynone
verticalAlignvertical-alignnone
overflowoverflownone
overflowXoverflowXnone
overflowYoverflowYnone
colorcolorcolors
bg, backgroundColorbackground-colorcolors
opacityopacitynone

TYPOGRAPHY

typography props will generally occur in text components. For most other components, you may need to override the theme instead - this is to stay consistent with the typography within your design. Check out how to override the default Bridge theme.

PropCSS PropertyTheme Field
fontFamilyfont-familyfonts
fontSizefont-sizefontSizes
fontWeightfont-weightfontWeights
lineHeightline-heightlineHeights
letterSpacingletter-spacingletterSpacings
textAligntext-alignnone
fontStylefont-stylenone

FLEX

FLEX props include flexbox css properties

PropCSS PropertyTheme Field
alignItemsalign-itemsnone
alignContentalign-contentnone
justifyItemsjustify-itemsnone
justifyContentjustify-contentnone
flexWrapflex-wrapnone
flexDirectionflex-directionnone
flexflex (shorthand)none
flexGrowflex-grownone
flexShrinkflex-shrinknone
flexBasisflex-basisnone
justifySelfjustify-selfnone
alignSelfalign-selfnone
orderordernone

BORDER

BORDER props include any styling for borders (usually used in wrappers around divs - e.g. Box, Flex)

PropCSS PropertyTheme Field
borderborderborders
borderWidthborder-widthborderWidths
borderStyleborder-styleborderStyles
borderColorborder-colorcolors
borderRadiusborder-radiusradii
borderTopborder-topborders
borderTopWidthborder-top-widthborderWidths
borderTopStyleborder-top-styleborderStyles
borderTopColorborder-top-colorcolors
borderTopLeftRadiusborder-top-left-radiusradii
borderTopRightRadiusborder-top-right-radiusradii
borderRightborder-rightborders
borderRightWidthborder-right-widthborderWidths
borderRightStyleborder-right-styleborderStyles
borderRightColorborder-right-colorcolors
borderBottomborder-bottomborders
borderBottomWidthborder-bottom-widthborderWidths
borderBottomStyleborder-bottom-styleborderStyles
borderBottomColorborder-bottom-colorcolors
borderBottomLeftRadiusborder-bottom-left-radiusradii
borderBottomRightRadiusborder-bottom-right-radiusradii
borderLeftborder-leftborders
borderLeftWidthborder-left-widthborderWidths
borderLeftStyleborder-left-styleborderStyles
borderLeftColorborder-left-colorcolors
borderXborder-left & border-rightborders
borderYborder-top & border-bottomborders