Glowup
DATA DISPLAY · 46 / 89
Badge
Badge — a Material You data display component for React Native and web.
󱀫
packages/ui/src/components/Badge.tsx
Live demo
5
Properties
4 controls
Count
Max
Show Zero
Size
Large
󰍝
Usage
Badge.tsx
<Badge />
Variants
The states and shapes this component is meant to be used in.
On icon buttons
3
Inbox
12
Alerts
99+
Cart
Sizes
7
large (count)
small (dot)
Overflow and zero
99+
250, max 99
5+
9, max 5
0
0, showZero
0, hidden
On avatar
4
Katherine Johnson
4 unread messages
API reference
Generated from the library's TypeScript, so it cannot drift from the implementation.
Props
6 on BadgeProps
count
number
max
number
default: 99
Cap shown as "max+" when count exceeds it.
showZero
boolean
default: false
Render the badge even when count is 0 (hidden by default).
size
"small" | "large"
default: "large"
style
any
visible
boolean
default: true