Skip to content
Alea0.1

Data display

Ribbon and Indicator

A label around a card's corner, and a dot or number on the corner of an avatar or icon.

Ant Design: Badge.Ribbon, Badge with children

import { Ribbon, Indicator } from '@alea/ui';

Examples

Ribbons and indicators

Corner labels on cards, and status dots or counts on avatars and icons.

Lab Pro

All 13 plugins

Popular

Yearly

Two months free

-20%
Online12 unread notifications

Props

Ribbon props

A label wrapped around the corner of a card (Ant Badge.Ribbon).

PropTypeDefaultDescription
textrequiredReactNode-The ribbon's text: New, Popular, -20%.
classNamestring-Extra class names for the root element.
placement"start" | "end"'end'start or end (default) corner.
tone"danger" | "success" | "warning" | "accent" | "neutral"'accent'Color meaning: accent, success, warning, danger or neutral.

Indicator props

A dot or number on the corner of an avatar, icon or button: status, unread count (Mantine Indicator, Ant Badge with children).

PropTypeDefaultDescription
labelrequiredstring-What it means, for screen readers ("3 unread messages", "Online").
classNamestring-Extra class names for the root element.
countnumber-A number, or nothing for a dot.
isHiddenboolean-Hide it (keeps the child).
maxnumber99Shows max+ above this. Default 99.
position"bottom-end" | "top-end" | "top-start" | "bottom-start"'top-end'Which corner. Default top end.
processingboolean-Pulse to draw attention. Respects reduced motion.
tone"danger" | "success" | "warning" | "accent" | "neutral"'danger'Color meaning: accent, success, warning, danger or neutral.

Accessibility

  • The indicator has a text label for screen readers ("3 unread", "Online"); the number itself is hidden from them.

Do and don't

Do

  • Use one ribbon per card at most.
  • Keep it to one word or a short number (-20%).

Don't

  • Don't rely on the ribbon color alone.
  • Don't put actions in it.
Tested with axe, keyboard and screen reader roles