Skip to main content

Utility styles

This document provides a reference for the utility styles available in the project.

Spacing (Padding & Margin)

UtilityStyle
p-0padding: 0
p-1padding: 8
pl-1paddingLeft: 8
pr-1paddingRight: 8
px-1paddingHorizontal: 8
py-1paddingVertical: 8
m-0margin: 0
m-1margin: 8
ml-1marginLeft: 8
mr-1marginRight: 8
mx-1marginHorizontal: 8
my-1marginVertical: 8

Flexbox

UtilityStyle
flexdisplay: 'flex'
flexRowflexDirection: 'row'
flexColflexDirection: 'column'
flexWrapflexWrap: 'wrap'
flexNoWrapflexWrap: 'nowrap'
itemsCenteralignItems: 'center'
itemsStartalignItems: 'flex-start'
itemsEndalignItems: 'flex-end'
justifyStartjustifyContent: 'flex-start'
justifyCenterjustifyContent: 'center'
justifyEndjustifyContent: 'flex-end'
justifyBetweenjustifyContent: 'space-between'
justifyAroundjustifyContent: 'space-around'
itemsCenteralignItems: 'center'
itemsStartalignItems: 'flex-start'
itemsEndalignItems: 'flex-end'
selfCenteralignSelf: 'center'
selfStartalignSelf: 'flex-start'
selfEndalignSelf: 'flex-end'

Text & Font

UtilityStyle
textCentertextAlign: 'center'
textLefttextAlign: 'left'
textRighttextAlign: 'right'
textJustifytextAlign: 'justify'
textUnderlinetextDecorationLine: 'underline'
textLineThroughtextDecorationLine: 'line-through'
textNoDecorationtextDecorationLine: 'none'
textUppercasetextTransform: 'uppercase'
textLowercasetextTransform: 'lowercase'
textCapitalizetextTransform: 'capitalize'
fontThinfontWeight: '100'
fontLightfontWeight: '300'
fontNormalfontWeight: '400'
fontMediumfontWeight: '500'
fontBoldfontWeight: '700'
fontExtraBoldfontWeight: '800'
fontBlackfontWeight: '900'

Borders

UtilityStyle
borderborderWidth: 1
borderNoneborderWidth: 0
borderTopborderTopWidth: 1,
borderBottomborderBottomWidth: 1,
borderLeftborderLeftWidth: 1,
borderRightborderRightWidth: 1,
roundedborderRadius: 8
roundedSmborderRadius: 8
roundedLgborderRadius: 16
roundedFullborderRadius: 9999

Backgrounds

UtilityStyle
bgPrimarybackgroundColor: '#3498db'
bgSecondarybackgroundColor: '#2ecc71'
bgWhitebackgroundColor: '#ffffff'
bgBlackbackgroundColor: '#000000'

Colors

UtilityStyle
textPrimarycolor: '#3498db'
textSecondarycolor: '#2ecc71'
bgBackgroundLightcolor: '#ffffff'
textBlackcolor: '#000000'

Width & Height

UtilityStyle
wFullwidth: '100%'
hFullheight: '100%'
wHalfwidth: '50%'
hHalfheight: '50%'

Overflow

UtilityStyle
overflowHiddenoverflow: 'hidden'
overflowVisibleoverflow: 'visible'
overflowScrolloverflow: 'scroll'

PointerEvent

UtilityStyle
pointerEventNonepointerEvents: 'none'
pointerEventAutopointerEvents: 'auto'

Opacity

UtilityStyle
opacity-0opacity: 0
opacity-25opacity: 0.25
opacity-50opacity: 0.5
opacity-75opacity: 0.75
opacity-100opacity: 1

Shadows

UtilityStyle
shadowshadowColor: '#000000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.23, shadowRadius: 2.62, elevation: 4
shadowLgshadowColor: '#000000', shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.3, shadowRadius: 4.65, elevation: 8

Positioning

UtilityStyle
absoluteposition: 'absolute'
relativeposition: 'relative'
top-0top: 0
right-0right: 0
bottom-0bottom: 0
left-0left: 0

Z-Index

UtilityStyle
zIndex-1zIndex: 1
zIndex-10zIndex: 10

This utility reference helps in writing clean and reusable styles in React Native. 🚀