Skip to main content

Badge logo component

Effect demonstration

1. Type defaults to text.

<Badge text={4}>
<Box width={50} height={52} backgroundColor="warningColor2" />
</Badge>
<WhiteSpace />
<Badge text="fold" backgroundColor="primaryTextColor">
<Box backgroundColor="warningColor2" width={52} height={52} />
</Badge>
<WhiteSpace />
badge-ios1.png

2. type for dot

<Badge text={4} type="dot">
<Box width={50} height={52} backgroundColor="warningColor2" />
</Badge>
badge-ios3.png

API

PropertiesRequiredDescriptionTypeDefault Value
typefalseform of badgedot | texttext
textfalsecontent of badgestring | number
maxfalseDisplay the capped valuenumber99
containerStylefalseThe style of the badge's containerViewStyle
textStylefalsebadge Chinese text styleViewStyle