Components/Feedback
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/counterbadge
A counter badge is a numeric indicator that shows the count of pending or unseen items that require user attention.
<Badge/> instead.<Tag/> instead.Adjust the component size using the size prop. It supports 2 sizes:
mediumsmallControl the skin of a component with skin prop. Is support 10 skins:
general - use it as the default emphasisdanger - use it to highlight a destructive or critical valueurgent - use it to draw immediate attention to a valuestandard - use it as the primary branded emphasiswarning - use it to highlight a value that can have an unexpected impactwarningLight - use it when warning needs reduced emphasissuccess - use it to highlight confirmed or completed valueslight - use it on dark backgroundsneutralStandard - use it when the counter needs neutral emphasisneutralLight - use it when the counter needs minimal emphasis on light backgroundsUse the showShadow prop to add a drop shadow to the counter badge.
A counter badge can also display a custom node as its content, like an icon or a short text label, instead of a number.
Attach a counter badge to an icon button to show the number of items in a cart, updating as items are added or removed.
Use a counter badge to show the number of items in each category, making it easy to identify where attention is needed most.
By displaying a custom node inside a counter badge, you can highlight non-numeric information — like a "New!" label to draw attention to a recently added feature or item.
| Name | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Any element to be rendered inside. |
dataHook | string | — | Applied as data-hook HTML attribute that can be used in the tests. |
locale | "th" | "tr" | "id" | "fr" | "no" | "en" | "en-US" | "en-GB" | "en-AU" | "en-CA" | "ar" | "bg" | "ca" | "zh" | "zh-TW" | "zh-HK" | "zh-MO" | "cs" | "da" | "nl" | "fi" | "fr-CA" | "fr-CH" | "fr-BE" | "de" | "de-CH" | "de-AT" | "el" | "he" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "ms" | "nb" | "nn" | "pl" | "pt-BR" | "pt" | "ro" | "ru" | "sk" | "sl" | "es" | "es-419" | "es-AR" | "es-MX" | "es-US" | "sv" | "tl" | "uk" | "vi" | — | Sets locale and formats the number according to it. |
onMouseEnter | MouseEventHandler | — | Callback fired when the mouse pointer enters the component. |
onMouseLeave | MouseEventHandler | — | Callback fired when the mouse pointer leaves the component. |
showShadow (required) | boolean | — | Makes the card have a box-shadow style. |
size (required) | "small" | "tiny" | "medium" | — | The component's size. Can be tiny, small or medium. |
skin (required) | "warning" | "standard" | "light" | "success" | "general" | "danger" | "neutralLight" | "warningLight" | "urgent" | "neutralStandard" | — | The component's colors. |
truncate (required) | boolean | true | Control whether values greater than 99 should be truncated. |
type (required) | "solid" | "outlined" | 'solid' | The component's visual style. |
Import the driver matching your test environment:
| Method | Description |
|---|---|
getContentText | Gets CounterBadge content text if children are text based |
getLocale | Gets passed locale |
mouseEnter | Triggers a mouseEnter event |
mouseLeave | Triggers a mouseLeave event |
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
click | Clicks on the component root element. |
base | Returns UniDriver for the base element. |
Last updated: 22 October 2026