Badge
Badges are small components typically used to communicate a numerical value or indicate the status of an item to the user.
#
Usage#
withBadge Higher-Order ComponentThe withBadge HOC allows you to easily add badges to icons and other components.
#
Props#
Badge#
Reference#
Badge#
ComponentCustom component to replace the badge outer component.
Type | Default |
---|---|
React Component | Pressable or View |
#
badgeStyleAdditional styling for badge (background) view component.
Type | Default |
---|---|
View style(Object) | None |
#
containerStyleStyle for the container.
Type | Default |
---|---|
View style(Object) | None |
#
statusDetermines color of the indicator.
Type | Default |
---|---|
"primary" or "success" or "warning" or "error" | primary |
#
textPropsExtra props for text component.
Type | Default |
---|---|
TextProps | None |
#
textStyleExtra styling for icon component.
Type | Default |
---|---|
Text Style(Object) | None |
#
valueText value to be displayed by badge, defaults to empty.
Type | Default |
---|---|
any | None |