Components

Notification

A count or a dot pinned to a glyph when something needs attention.

iOS
Android
Web
import Notification from "swshd/Notification";

Notification pins a count or a dot to a glyph when something needs attention. It is the one place the brand accent is used as a fill.

Don't use it to classify — that is Badge.

With a count the notification is a 16 px accent pill with label-sm digits; without one it is a 7 px dot. A 2 px ring in bg.surface cuts it out of whatever it overlaps.

The parent positions the notification — absolutely, over an icon's top corner. SidebarItem does it for you: pass notification and notificationLabel.

import Notification from "swshd/Notification";

<Notification count={2} accessibilityLabel="2 pending invites" />

The notification is a role="img" named by accessibilityLabel. SidebarItem folds it into the row's accessible name instead of announcing it twice.

PropTypeDefaultDescription
countnumber—Digits to show; omit for a dot.
accessibilityLabelstring—What the notification means ("2 pending invites"); the digits alone are not a name.
testIDstring—data-testid on web.