---
title: Badge
summary: A badge is a small label for a count, a status or a tag. It comes in colors, light styles, pills, dots and notification badges.
description: Add badges to show counts, labels, or statuses. Use colors, pill styles, links, and notification dots to add context.
related: [/ui/components/status, /ui/components/tag]
source: core/scss/ui/_badges.scss
css-vars: badge
classnames:
component:
- class: badge
desc: Container element
part:
- class: badge-dot
desc: Small dot with no text, for a status marker
- class: badge-icononly
desc: Square badge holding only an icon
- class: badge-notification
desc: Positions the badge over the corner of its parent
- class: badge-list
desc: Wrapper that spaces several badges in a row
modifier:
- class: badge-pill
desc: Fully rounded ends
behavior:
- class: badge-blink
desc: Pulsing animation, for a live counter
color:
- class: bg-{color}
desc: Any base color, for example bg-green or bg-red
size:
- class: badge-sm
desc: Small size
- class: badge-lg
desc: Large size
---
import BadgeList from '@ui/BadgeList.astro';
import Example from '@components/Example.astro';
import Badge from '@ui/Badge.astro';
import site from '@data/site.json';
export const colors = Object.entries(site.colors);
## Default markup
The default badges are square and come in the basic set of colors.