Badge
A small dot or count on the corner of an icon showing unread items.
aria-label="3 unread"When to use it
For unread counts or a "new" status.
Common mistake
Don’t put one on everything; it stops meaning anything.
Accessibility
Put the count in the accessible name; a red dot alone says nothing.
Name in code
| HTML/CSS | aria-label="3 unread" |
|---|---|
| React | <Badge> |
| Jetpack Compose | BadgedBox + Badge |
| SwiftUI | .badge(3) |
Ready prompt for your coding agent
Add a Badge to this screen.
What it is: A small dot or count on the corner of an icon showing unread items.
Implement with: aria-label="3 unread" (HTML/CSS).
Accessibility: Put the count in the accessible name; a red dot alone says nothing.
When to use it: For unread counts or a "new" status.
Avoid: Don’t put one on everything; it stops meaning anything.
Reuse the project's existing design tokens, spacing and component conventions.
Or compose a whole page from this element and others →
Prompts are in English for the most precise results with coding agents.