KKUONIDesign System

Components

Notification Badge

Beta

A small count bubble or dot overlaid on an icon to signal unread or pending items. Used for wishlist counts, saved trips, and basket item counts in navigation.

โ™ฅ3๐Ÿ›’12โœ‰โ˜…

Purpose

The NotificationBadge overlays a small count or dot indicator on any trigger icon to signal pending or unread items โ€” without interrupting the user's current task.

It appears in the navigation bar to show:

  • Wishlist โ€” number of saved holiday cards
  • Saved trips โ€” number of itineraries the user has bookmarked
  • Basket โ€” number of items in the travel basket

The badge uses Kuoni Yellow (#F5C518) as its background with dark text โ€” providing the highest contrast against both the white nav bar and teal-tinted surfaces without relying on red (which is reserved for error and danger states).

The count badge hides automatically when count === 0 or count is not provided. The dot variant is always visible when rendered.

Usage

Use NotificationBadge to overlay a count or dot on an icon trigger when you need to signal pending items without interrupting the user โ€” it is a passive indicator, not an interactive control itself. If the underlying status is about a single item rather than a count of items (e.g. "Confirmed", "Cancelled"), use Pill or Badge instead.

It typically appears in the site NavBar, anchored to icon buttons for wishlist, saved trips, or basket.

Anatomy

โ™ฅ5count
โœ‰99+99+ cap
๐Ÿ””dot
  1. 1
    Trigger slot โ€” Any ReactNode (typically an icon button). The badge is positioned absolute top-right of this element.
  2. 2
    Badge bubble โ€” Small rounded-full pill in Kuoni Yellow. 18 px minimum dimension; expands horizontally for multi-digit counts.
  3. 3
    Count label โ€” Number in 10 px semibold dark text. Shows "99+" when count exceeds max.
  4. 4
    Dot variant โ€” 10 px filled circle. No number โ€” signals new activity without a specific count.

Variants

Count badge

Displays an exact number. Hides when count is 0 or undefined.

โ™ฅ1โ˜…7๐Ÿ›’14

99+ cap

When count exceeds max (default 99), the badge shows 99+.

โœ‰99+

Dot variant

No number โ€” signals new activity without revealing the count.

๐Ÿ””

Hidden when empty

When count is 0 or not provided, no badge renders. This prevents a yellow bubble appearing on empty wishlists.

โ™ฅNo badge shown when count is 0

Best practices

Do

Use the count variant when the exact number helps the user โ€” wishlist size, basket items.

A count of 3 on the wishlist icon tells users exactly how many items they have saved.

Don't

Use a red or danger-coloured badge for counts that are not errors or alerts.

A red danger badge on a wishlist icon implies something is wrong โ€” wishlist count is not a warning.

Do

Use the dot variant when you know there is new activity but do not have an exact count.

The dot signals new activity (a new message, a price drop) without requiring an exact count from the API.

Don't

Keep the dot visible indefinitely after the user has acknowledged the notification.

A dot that never goes away becomes invisible โ€” users stop seeing it after a few sessions.

Do

Wrap the exact element the badge should anchor to โ€” usually just the icon, not a wider container.

Wrap the icon button in NotificationBadge so the badge is positionally anchored to the icon, not the label.

Don't

Wrap an excessively large container โ€” the badge will appear at the top-right corner of the wrapper.

Wrapping a large nav section in NotificationBadge places the badge in the wrong corner.

Props

PropTypeDefaultDescription
children*ReactNodeโ€”The trigger element the badge overlays. Typically an icon or icon button.
countnumberโ€”The number to display. Badge is hidden when count is 0 or undefined.
variant'count' | 'dot''count'count shows a number; dot shows a small filled circle with no number.
maxnumber99Maximum number to display. Counts above this show as max+.
classNamestringโ€”Additional Tailwind classes on the root wrapper span.

Accessibility

aria-label on the badge

The yellow bubble itself has an aria-label that announces the count:

<span aria-label="3 notifications">3</span>

For the dot variant, the label is "New" โ€” indicating new activity without a count.

Trigger element

The trigger element (icon button) should have its own aria-label that describes the total context:

<NotificationBadge count={3}>
  <button aria-label="Wishlist โ€” 3 saved holidays">
    <HeartIcon />
  </button>
</NotificationBadge>

Including the count in the button's aria-label provides a complete accessible name without requiring screen readers to piece together the button name and the badge label separately.

Keyboard interaction

The NotificationBadge is a display-only wrapper. All keyboard interaction is handled by the wrapped trigger element.

  • Pill โ€” better suited to a labelled status (e.g. "Confirmed") rather than a count or dot overlay on an icon.
  • Badge โ€” the closest sibling for other small decorative or status indicators outside the icon-overlay pattern.