Badge
Badges are small components typically used to indicate the status of an item, such as "new" or "unread", to the user.
Import
import { Badge } from '@nomada-sh/react-native-eyecandy';
Example
Props
View Props
Inherits View Props.
color
| Type | Default |
|---|---|
'default' or 'primary' or 'error' or 'warning' or 'success' or 'greyout' | 'default' |
size
| Type | Default |
|---|---|
| number | 18 |
anchorOrigin
| Type | Default |
|---|---|
| AnchorOrigin | { vertical: 'bottom', horizontal: 'right' } |
badgeStyle
| Type |
|---|
| View Style |
hidden
| Type |
|---|
| boolean |
Type Definitions
AnchorOrigin
| Type |
|---|
| object |
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| horizontal | 'left' or 'right' | Yes | Horizontal position of the badge. |
| vertical | 'top' or 'bottom' | Yes | Vertical position of the badge. |