Header

A custom component for rendering a header at the top of the screen

Center Aligned

<Header
  p="lg"
  borderBottomWidth={1}
  borderBottomColor="gray200"
  alignment="center"
  prefix={
    <Button bg="transparent">
      <Icon name="arrow-left" fontFamily="Feather" fontSize="2xl" />
    </Button>
  }
>
  My Title
</Header>

Left Aligned

<Header
  p="lg"
  alignment="left"
  prefix={
    <Button bg="transparent">
      <Icon name="arrow-left" fontFamily="Feather" fontSize="2xl" />
    </Button>
  }
  suffix={
    <Button bg="transparent">
      <Icon name="more-vertical" fontFamily="Feather" />
    </Button>
  }
>
  My Title
</Header>

Props

PropertyDescriptionTypeDefault
mmargin`stringnumber`
mtmargin top`stringnumber`
mrmargin right`stringnumber`
mbmargin bottom`stringnumber`
mlmargin margin left`stringnumber`
mxmargin horizonal`stringnumber`
mymargin vertical`stringnumber`
ppadding`stringnumber`
ptpadding top`stringnumber`
prpadding right`stringnumber`
pbpadding bottom`stringnumber`
plpadding margin left`stringnumber`
pxpadding horizonal`stringnumber`
pypadding vertical`stringnumber`
hheightnumber-
wwidthnumber-
bgbackground colorstring-
minHmininmum heightnumber-
minWminimum widthstring-
bgImgbackground imageImageSourcePropType-
bgModeresize mode for background image`“contain”“cover”
roundedborder radius`stringnumber`
roundedTopborder radius top`stringnumber`
roundedBottomborder radius bottom`stringnumber`
roundedLeftborder radius left`stringnumber`
roundedRightborder radius right`stringnumber`
borderColorcolor for borderstring-
borderTopColorcolor for border topstring-
borderRightColorcolor for border rightstring-
borderLeftColorcolor for border leftstring-
borderBottomColorcolor for border bottomstring-
borderWidthwidth for bordernumber-
borderTopWidthwidth for border topnumber-
borderRightWidthwidth for border rightnumber-
borderLeftWidthwidth for border leftnumber-
borderBottomWidthwidth for border bottomnumber-
flexflex property for containernumber-
rowmakes flex direction to row when trueboolean-
shadowdescribe the depth of shadownumber-
shadowColorcolor for shadowstring-
justifyContentdescribes how to align children within the main axis of their container`“flex-start”“flex-end”
alignItemsdescribes how to align children along the cross axis of their container`“flex-start”“flex-end”
flexDircontrols the direction in which children of a node are laid out`“row”“column”
flexWrapcontrols what happens when children overflow the size of the container along the main axis`“wrap”“nowrap”
positionused to position the childrens`absolute”“relative”`
topnumber of logical pixels to offset the top edge of this component.number-
rightnumber of logical pixels to offset the right edge of this component.number-
bottomnumber of logical pixels to offset the bottom edge of this component.number-
leftnumber of logical pixels to offset the left edge of this component.number-
opacityopacity of divnumber-
alignSelfalignment for the selected item inside the flexible container.`‘auto’‘flex-start’
overflowcontrols how children are measured and displayed`“visible”“scroll”
suffixRenders a component on the rightReactNode-
prefixRenders a component on the leftReactNode-