PatternFly

Notification badge

A notification badge is intended to be used with a notification drawer as a visible indicator to alert the user about incoming notifications.

Examples

Basic



With count



Expanded



Documentation

Overview

Always add a modifier class to indicate read, unread, or attention state. Never use the class .pf-v5-c-notification-badge on its own. This component is designed to be used within a dark component such as the masthead.

Accessibility

Be sure that the component associated with this indicator handles screen reader text indicating read or unread notifications.

Usage

Class
Applied to
Outcome
.pf-v5-c-notification-badge
<div>
Initiates a notification badge. Always use it with a modifier class.
.pf-v5-c-notification-badge__count
<span>
Initiates a notification badge count.
.pf-m-read
.pf-v5-c-notification-badge
Applies read notification badge styling.
.pf-m-unread
.pf-v5-c-notification-badge
Applies unread notification badge styling.
.pf-m-attention
.pf-v5-c-notification-badge
Applies attention notification badge styling.
.pf-m-expanded
.pf-v5-c-notification-badge
Applies expanded notification badge styling.

CSS variables

Expand or collapse columnSelectorVariableValue
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--PaddingTop
0.375rem
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--PaddingRight
1rem
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--PaddingBottom
0.375rem
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--PaddingLeft
1rem
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--MarginTop
calc(-1 * 0.375rem)
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--MarginRight
calc(-1 * 1rem)
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--MarginBottom
calc(-1 * 0.375rem)
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--MarginLeft
calc(-1 * 1rem)
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--after--BorderColor
transparent
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--after--BorderRadius
3px
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--after--BorderWidth
0
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--after--Top
0
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--after--Right
0
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--after--Width
auto
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--after--Height
auto
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--after--BackgroundColor
transparent
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--after--TranslateX
0
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--after--TranslateY
0
.pf-v5-c-notification-badge--pf-v5-c-notification-badge__i--Width
auto
.pf-v5-c-notification-badge--pf-v5-c-notification-badge__i--Height
auto
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--m-read--after--BorderColor
transparent
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--m-read--after--BackgroundColor
transparent
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--m-read--m-expanded--after--BackgroundColor
#3c3f42
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--m-unread--Color
#fff
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--m-unread--after--BackgroundColor
#06c
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--m-unread--hover--after--BackgroundColor
#004080
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--m-unread--m-expanded--after--BackgroundColor
#004080
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--m-attention--Color
#fff
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--m-attention--after--BackgroundColor
#c9190b
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--m-attention--hover--after--BackgroundColor
#a30000
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--m-attention--m-expanded--after--BackgroundColor
#a30000
.pf-v5-c-notification-badge--pf-v5-c-notification-badge__count--MarginLeft
0.25rem
.pf-v5-c-notification-badge--pf-v5-c-notification-badge--pf-v5-pficon-attention-bell--LineHeight
1.3
.pf-v5-c-notification-badge.pf-m-read--pf-v5-c-notification-badge--after--BackgroundColor
transparent
.pf-v5-c-notification-badge.pf-m-read--pf-v5-c-notification-badge--after--BorderColor
transparent
.pf-v5-c-notification-badge.pf-m-unread--pf-v5-c-notification-badge--after--BackgroundColor
#06c
.pf-v5-c-notification-badge.pf-m-unread:hover--pf-v5-c-notification-badge--after--BackgroundColor
#004080
.pf-v5-c-notification-badge.pf-m-attention--pf-v5-c-notification-badge--after--BackgroundColor
#c9190b
.pf-v5-c-notification-badge.pf-m-attention:hover--pf-v5-c-notification-badge--m-attention--after--BackgroundColor
#a30000
.pf-v5-c-notification-badge.pf-m-expanded--pf-v5-c-notification-badge--m-read--Color
#fff
.pf-v5-c-notification-badge.pf-m-expanded--pf-v5-c-notification-badge--m-read--after--BackgroundColor
#3c3f42
.pf-v5-c-notification-badge.pf-m-expanded--pf-v5-c-notification-badge--m-unread--after--BackgroundColor
#004080
.pf-v5-c-notification-badge.pf-m-expanded--pf-v5-c-notification-badge--m-attention--after--BackgroundColor
#a30000

View source on GitHub