.badge(value: number | string)
The badge content. Pass a number for a count badge, or a string for a text badge.
Support
Usage
Numeric badge on a list row
Text badge
Text("Updates")
.badge("New")
Badge on a tab item
Label("Messages", { systemName: "message" })
.badge(unreadCount)
Notes
Badges are most commonly used with List rows and TabView items. On iOS, the system renders the badge in a rounded capsule aligned to the trailing edge.
See Also