Badge

Used to show status or some numerical value


import { Badge } from 'react-native-magnus'

<Badge>
  <Avatar bg="red100" color="red700">
    A
  </Avatar>
</Badge>
<Badge ml="md">1</Badge>
<Badge ml="md" bg="red500">
  99+
</Badge>
<Badge bg="red500" right={-5} top={-5} h={10} w={10}>
  <Image
    ml="md"
    h={50}
    w={50}
    rounded="md"
    source={{
      uri: 'https://i.pravatar.cc/150?img=12',
    }}
  />
</Badge>

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`
bgbackground colorstringgreen700
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 bottomnumber-
borderLeftWidthwidth for border leftnumber-
borderBottomWidthwidth for border bottomnumber-
positionused to position the childrens`absolute”“relative”`
topnumber of logical pixels to offset the top edge of this component.number0
rightnumber of logical pixels to offset the right edge of this component.number0
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-