PatternFly

Notification drawer

A notification drawer is a place where users can view and manage notifications that are generated by the system. It allows them to see a list of notifications without the need to navigate away from the current screen.

Examples

Basic

Notifications

3 unread
  • Info notification: Unread info notification title

    This is an info notification description.
    5 minutes ago
  • Custom notification: Unread recommendation notification title. This is a long title to show how the title will wrap if it is long and wraps to multiple lines.

    This is a recommendation notification description. This is a long description to show how the title will wrap if it is long and wraps to multiple lines.
    10 minutes ago
  • Custom notification: Unread recommendation notification title. This is a long title to show how the title will wrap if it is long and wraps to multiple lines.

    This is a recommendation notification description. This is a long description to show how the title will wrap if it is long and wraps to multiple lines.
    20 minutes ago
  • Warning notification: Read warning notification title

    This is a warning notification description.
    20 minutes ago
  • Success notification: Read success notification title

    This is a success notification description.
    30 minutes ago
  • Success notification: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent quis odio risus. Ut dictum vitae sapien at posuere. Nullam suscipit massa quis lacus pellentesque scelerisque. Donec non maximus neque, quis ornare nunc. Vivamus in nibh sed libero feugiat feugiat. Nulla lacinia rutrum est, a commodo odio vestibulum suscipit. Nullam id quam et quam porttitor interdum quis nec tellus. Vestibulum arcu dui, pulvinar eu tellus in, semper mattis diam. Sed commodo tincidunt lacus non pulvinar. Curabitur tempor molestie vestibulum. Vivamus vel mi dignissim, efficitur neque eget, efficitur massa. Mauris vitae nunc augue. Donec augue lorem, malesuada et quam vitae, volutpat mattis nisi. Nullam nec venenatis ex, quis lobortis purus. Sed nisl dolor, mattis sit amet tincidunt quis, mollis sed massa.

    This example uses ".pf-m-truncate" to limit the title to a single line and truncate any overflow text with ellipses.
    40 minutes ago
  • Success notification: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent quis odio risus. Ut dictum vitae sapien at posuere. Nullam suscipit massa quis lacus pellentesque scelerisque. Donec non maximus neque, quis ornare nunc. Vivamus in nibh sed libero feugiat feugiat. Nulla lacinia rutrum est, a commodo odio vestibulum suscipit. Nullam id quam et quam porttitor interdum quis nec tellus. Vestibulum arcu dui, pulvinar eu tellus in, semper mattis diam. Sed commodo tincidunt lacus non pulvinar. Curabitur tempor molestie vestibulum. Vivamus vel mi dignissim, efficitur neque eget, efficitur massa. Mauris vitae nunc augue. Donec augue lorem, malesuada et quam vitae, volutpat mattis nisi. Nullam nec venenatis ex, quis lobortis purus. Sed nisl dolor, mattis sit amet tincidunt quis, mollis sed massa.

    This example uses ".pf-m-truncate" and sets "--pf-v5-c-notification-drawer__list-item-header-title--max-lines: 2" to limit title to two lines and truncate any overflow text with ellipses.
    50 minutes ago

Groups

Notifications

9 unread

  • Info notification: Unread info notification title

    This is an info notification description.
    5 minutes ago
  • Custom notification: Unread recommendation notification title. This is a long title to show how the title will wrap if it is long and wraps to multiple lines.

    This is a recommendation notification description. This is a long description to show how the title will wrap if it is long and wraps to multiple lines.
    10 minutes ago
  • Custom notification: Unread recommendation notification title. This is a long title to show how the title will wrap if it is long and wraps to multiple lines.

    This is a recommendation notification description. This is a long description to show how the title will wrap if it is long and wraps to multiple lines.
    20 minutes ago
  • Warning notification: Read warning notification title

    This is a warning notification description.
    20 minutes ago
  • Success notification: Read success notification title

    This is a success notification description.
    30 minutes ago
  • Success notification: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent quis odio risus. Ut dictum vitae sapien at posuere. Nullam suscipit massa quis lacus pellentesque scelerisque. Donec non maximus neque, quis ornare nunc. Vivamus in nibh sed libero feugiat feugiat. Nulla lacinia rutrum est, a commodo odio vestibulum suscipit. Nullam id quam et quam porttitor interdum quis nec tellus. Vestibulum arcu dui, pulvinar eu tellus in, semper mattis diam. Sed commodo tincidunt lacus non pulvinar. Curabitur tempor molestie vestibulum. Vivamus vel mi dignissim, efficitur neque eget, efficitur massa. Mauris vitae nunc augue. Donec augue lorem, malesuada et quam vitae, volutpat mattis nisi. Nullam nec venenatis ex, quis lobortis purus. Sed nisl dolor, mattis sit amet tincidunt quis, mollis sed massa.

    This example uses ".pf-m-truncate" to limit the title to a single line and truncate any overflow text with ellipses.
    40 minutes ago
  • Success notification: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent quis odio risus. Ut dictum vitae sapien at posuere. Nullam suscipit massa quis lacus pellentesque scelerisque. Donec non maximus neque, quis ornare nunc. Vivamus in nibh sed libero feugiat feugiat. Nulla lacinia rutrum est, a commodo odio vestibulum suscipit. Nullam id quam et quam porttitor interdum quis nec tellus. Vestibulum arcu dui, pulvinar eu tellus in, semper mattis diam. Sed commodo tincidunt lacus non pulvinar. Curabitur tempor molestie vestibulum. Vivamus vel mi dignissim, efficitur neque eget, efficitur massa. Mauris vitae nunc augue. Donec augue lorem, malesuada et quam vitae, volutpat mattis nisi. Nullam nec venenatis ex, quis lobortis purus. Sed nisl dolor, mattis sit amet tincidunt quis, mollis sed massa.

    This example uses ".pf-m-truncate" and sets "--pf-v5-c-notification-drawer__list-item-header-title--max-lines: 2" to limit title to two lines and truncate any overflow text with ellipses.
    50 minutes ago

Accessibility

Attribute
Applied to
Outcome
aria-expanded="false"
.pf-v5-c-notification-drawer__group-toggle
Indicates that the group notification list is hidden.
aria-expanded="true"
.pf-v5-c-notification-drawer__group-toggle
Indicates that the group notification list is visible.
hidden
.pf-v5-c-notification-drawer__list
Indicates that the group notification list is hidden so that it isn't visible in the UI and isn't accessed by assistive technologies.
tabindex="0"
.pf-v5-c-notification-drawer__list-item.pf-m-hoverable
Inserts the hoverable list item into the tab order of the page so that it is focusable.
aria-hidden="true"
.pf-v5-c-notification-drawer__group-toggle-icon > *, .pf-v5-c-notification-drawer__list-item-header-icon > *
Hides icon for assistive technologies.

Usage

Class
Applied to
Outcome
.pf-v5-c-notification-drawer
<div>
Initiates the notification drawer. Required
.pf-v5-c-notification-drawer__header
<div>
Initiates the notification drawer header. Required
.pf-v5-c-notification-drawer__header-title
<h1>
Initiates the notification drawer header title. Required
.pf-v5-c-notification-drawer__header-status
<span>
Initiates the notification drawer header status.
.pf-v5-c-notification-drawer__header-action
<div>
Initiates the notification drawer header action.
.pf-v5-c-notification-drawer__header-action-close
<div>
Initiates the notification drawer header action button.
.pf-v5-c-notification-drawer__body
<div>
Initiates the notification drawer body. Required
.pf-v5-c-notification-drawer__list
<ul>
Initiates a notification list. Required
.pf-v5-c-notification-drawer__list-item
<li>
Initiates a notification list item. Always use with a state modifier class. Required
.pf-v5-c-notification-drawer__list-item-header
<div>
Initiates a notification list item header. Required
.pf-v5-c-notification-drawer__list-item-header-icon
<span>
Initiates a notification list item header icon. Required
.pf-v5-c-notification-drawer__list-item-header-title
<h2>
Initiates a notification list item header title. Required
.pf-v5-c-notification-drawer__list-item-action
<div>
Initiates a notification list item action.
.pf-v5-c-notification-drawer__list-item-description
<div>
Initiates a notification list item description. Required
.pf-v5-c-notification-drawer__list-item-timestamp
<div>
Initiates a notification list item timestamp. Required
.pf-v5-c-notification-drawer__group-list
<div>
Initiates a notification group list. Required when notifications are grouped
.pf-v5-c-notification-drawer__group
<section>
Initiates a notification group. Required
.pf-v5-c-notification-drawer__group-toggle
<button>
Initiates a notification group toggle. Required
.pf-v5-c-notification-drawer__group-title
<div>
Initiates a notification group toggle title. Required
.pf-v5-c-notification-drawer__group-count
<div>
Initiates a notification group toggle count.
.pf-v5-c-notification-drawer__group-icon
<span>
Initiates a notification group toggle icon. Required
.pf-m-custom
.pf-v5-c-notification-drawer__list-item
Modifies a notification list item for the custom state.
.pf-m-info
.pf-v5-c-notification-drawer__list-item
Modifies a notification list item for the info state.
.pf-m-warning
.pf-v5-c-notification-drawer__list-item
Modifies a notification list item for the warning state.
.pf-m-danger
.pf-v5-c-notification-drawer__list-item
Modifies a notification list item for the danger state.
.pf-m-success
.pf-v5-c-notification-drawer__list-item
Modifies a notification list item for the success state.
.pf-m-read
.pf-v5-c-notification-drawer__list-item
Modifies a notification list item for the read state.
.pf-m-hoverable
.pf-v5-c-notification-drawer__list-item
Modifies a notification list item hover states to inidicate it is clickable.
.pf-m-expanded
.pf-v5-c-notification-drawer__group
Modifies a notification group for the expanded state.
.pf-m-truncate
.pf-v5-c-notification-drawer__list-item-header-title
Modifies the title to display a single line and truncate any overflow text with ellipses. Note: you can specify the max number of lines to show by setting the --pf-v5-c-notification-drawer__list-item-header-title--max-lines (the default value is 1).

CSS variables

Expand or collapse columnSelectorVariableValue
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer--BackgroundColor
#f0f0f0
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__header--PaddingTop
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__header--PaddingRight
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__header--PaddingBottom
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__header--PaddingLeft
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__header--BackgroundColor
#fff
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__header--BoxShadow
0 0.125rem 0.25rem -0.0625rem rgba(3, 3, 3, 0.16)
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__header--ZIndex
200
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__header-title--FontSize
1.25rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__header-status--MarginLeft
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__body--ZIndex
100
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--PaddingTop
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--PaddingRight
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--PaddingBottom
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--PaddingLeft
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--BackgroundColor
#fff
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--BoxShadow
inset 0 0.125rem 0.25rem -0.0625rem rgba(3, 3, 3, 0.16)
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--BorderBottomWidth
1px
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--BorderBottomColor
transparent
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--OutlineOffset
-0.25rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--before--Width
3px
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--before--Top
0
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--before--Bottom
calc(1px * -1)
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-info__list-item-header-icon--Color
#2b9af3
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-info__list-item--before--BackgroundColor
#2b9af3
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-warning__list-item-header-icon--Color
#f0ab00
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-warning__list-item--before--BackgroundColor
#f0ab00
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-danger__list-item-header-icon--Color
#c9190b
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-danger__list-item--before--BackgroundColor
#c9190b
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-success__list-item-header-icon--Color
#3e8635
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-success__list-item--before--BackgroundColor
#3e8635
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-custom__list-item-header-icon--Color
#009596
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-custom__list-item--before--BackgroundColor
#009596
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-read--BackgroundColor
#f0f0f0
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-read--BorderBottomColor
#d2d2d2
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-read--before--Top
calc(1px * -1)
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-read--before--Bottom
0
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-read--before--BackgroundColor
transparent
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--list-item--m-read--before--Top
0
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--list-item--m-read--BoxShadow
inset 0 0.125rem 0.25rem -0.0625rem rgba(3, 3, 3, 0.16)
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-hoverable--hover--ZIndex
100
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-hoverable--hover--BoxShadow
0 -0.5rem 0.5rem -0.375rem rgba(3, 3, 3, 0.18), 0 0.5rem 0.5rem -0.375rem rgba(3, 3, 3, 0.18)
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item-header--MarginBottom
0.25rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item-header-icon--Color
inherit
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item-header-icon--MarginRight
0.5rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item-header-title--FontWeight
700
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item-header-title--max-lines
1
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item--m-read__list-item-header-title--FontWeight
400
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item-description--MarginBottom
0.5rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item-timestamp--Color
#6a6e73
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__list-item-timestamp--FontSize
0.875rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group--m-expanded--group--BorderTopWidth
1px
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group--m-expanded--group--BorderTopColor
#d2d2d2
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group--m-expanded--MinHeight
0
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle--PaddingTop
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle--PaddingRight
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle--PaddingBottom
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle--PaddingLeft
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle--BackgroundColor
#fff
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle--BorderColor
#d2d2d2
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle--BorderBottomWidth
1px
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle--OutlineOffset
-0.25rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle-title--MarginRight
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle-title--max-lines
1
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle-count--MarginRight
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle-icon--MarginRight
1rem
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle-icon--Color
#6a6e73
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group-toggle-icon--Transition
.2s ease-in 0s
.pf-v5-c-notification-drawer--pf-v5-c-notification-drawer__group--m-expanded__group-toggle-icon--Rotate
90deg
.pf-v5-c-notification-drawer__list-item.pf-m-read--pf-v5-c-notification-drawer__list-item--BoxShadow
none
.pf-v5-c-notification-drawer__list-item.pf-m-read--pf-v5-c-notification-drawer__list-item--BorderBottomColor
#d2d2d2
.pf-v5-c-notification-drawer__list-item.pf-m-read--pf-v5-c-notification-drawer__list-item--BackgroundColor
#f0f0f0
.pf-v5-c-notification-drawer__list-item.pf-m-read--pf-v5-c-notification-drawer__list-item--before--Top
calc(1px * -1)
.pf-v5-c-notification-drawer__list-item.pf-m-read--pf-v5-c-notification-drawer__list-item--before--Bottom
0
.pf-v5-c-notification-drawer__list-item.pf-m-read--pf-v5-c-notification-drawer__list-item--before--BackgroundColor
transparent
.pf-v5-c-notification-drawer__list-item.pf-m-read--pf-v5-c-notification-drawer__list-item-header-title--FontWeight
400
.pf-v5-c-notification-drawer__list-item:not(.pf-m-read) + .pf-v5-c-notification-drawer__list-item.pf-m-read--pf-v5-c-notification-drawer__list-item--BoxShadow
inset 0 0.125rem 0.25rem -0.0625rem rgba(3, 3, 3, 0.16)
.pf-v5-c-notification-drawer__list-item:not(.pf-m-read) + .pf-v5-c-notification-drawer__list-item.pf-m-read--pf-v5-c-notification-drawer__list-item--before--Top
0
.pf-v5-c-notification-drawer__list-item.pf-m-info--pf-v5-c-notification-drawer__list-item--before--BackgroundColor
#2b9af3
.pf-v5-c-notification-drawer__list-item.pf-m-info--pf-v5-c-notification-drawer__list-item-header-icon--Color
#2b9af3
.pf-v5-c-notification-drawer__list-item.pf-m-warning--pf-v5-c-notification-drawer__list-item--before--BackgroundColor
#f0ab00
.pf-v5-c-notification-drawer__list-item.pf-m-warning--pf-v5-c-notification-drawer__list-item-header-icon--Color
#f0ab00
.pf-v5-c-notification-drawer__list-item.pf-m-danger--pf-v5-c-notification-drawer__list-item--before--BackgroundColor
#c9190b
.pf-v5-c-notification-drawer__list-item.pf-m-danger--pf-v5-c-notification-drawer__list-item-header-icon--Color
#c9190b
.pf-v5-c-notification-drawer__list-item.pf-m-success--pf-v5-c-notification-drawer__list-item--before--BackgroundColor
#3e8635
.pf-v5-c-notification-drawer__list-item.pf-m-success--pf-v5-c-notification-drawer__list-item-header-icon--Color
#3e8635
.pf-v5-c-notification-drawer__list-item.pf-m-custom--pf-v5-c-notification-drawer__list-item--before--BackgroundColor
#009596
.pf-v5-c-notification-drawer__list-item.pf-m-custom--pf-v5-c-notification-drawer__list-item-header-icon--Color
#009596
.pf-v5-c-notification-drawer__group .pf-v5-c-notification-drawer__list-item:last-child--pf-v5-c-notification-drawer__list-item--BorderBottomWidth
0
.pf-v5-c-notification-drawer__group .pf-v5-c-notification-drawer__list-item:last-child--pf-v5-c-notification-drawer__list-item--before--Bottom
0

View source on GitHub