@zendeskgarden/react-notifications package provides components for communicating system feedback, status messages, and persistent notices. All components require a ThemeProvider at the root of your application.
Installation
Notification
An inline notice component. UseNotification for non-blocking messages that inform users of events, confirmations, or context without interrupting their workflow.
Notification composes the following subcomponents:
Notification.Title— heading for the notificationNotification.Paragraph— body textNotification.Close— accessible dismiss button
Usage
Notification props
Applies type-specific icon and color styles. Accepts
'info', 'success', 'warning', or 'error'. Omitting this prop renders a neutral notification without an icon.Notification.Title props
Applies regular (non-bold) font weight to the title.
Toast
Toasts are ephemeral notifications that appear at a fixed position on screen. UseToastProvider to manage the toast stack and useToast to trigger toasts from any component.
Wrap your application (or the relevant subtree) with
ToastProvider before calling useToast.Usage
ToastProvider props
Limits the number of toasts visible at one time. Excess toasts are queued and shown as existing ones are dismissed.
Passes HTML attributes to the toast container element for each placement. Accepts keys:
'top-start', 'top', 'top-end', 'bottom-start', 'bottom', 'bottom-end'.Sets the
z-index of the toast container.Alert
A prominent inline message that draws attention to critical status. UseAlert when the user must be aware of a condition before proceeding.
Alert composes the following subcomponents:
Alert.Title— heading for the alertAlert.Paragraph— descriptive textAlert.Close— accessible dismiss button
Usage
- Info
- Warning
- Error
- Success
Alert props
Applies type-specific icon and color styling. Accepts
'info', 'success', 'warning', or 'error'.Alert.Title props
Applies regular (non-bold) font weight to the title.
Well
A container with a visible boundary. UseWell to group related content or draw subtle attention to a section without conveying urgency.
Well composes the following subcomponents:
Well.Title— heading for the wellWell.Paragraph— body text
Usage
Well props
Applies a recessed background color to visually indent the well.
Applies a drop shadow to elevate the well above surrounding content.
GlobalAlert
A full-width banner that spans the top of the page. UseGlobalAlert for site-wide announcements, mandatory notices, or persistent system status messages.
GlobalAlert composes the following subcomponents:
GlobalAlert.Title— heading for the bannerGlobalAlert.Content— body text areaGlobalAlert.Button— an inline action buttonGlobalAlert.Close— accessible dismiss button
GlobalAlert always renders with light theme colors regardless of the active theme.Usage
GlobalAlert props
Applies type-specific color styling. Accepts
'info', 'success', 'warning', or 'error'.GlobalAlert.Title props
Applies regular (non-bold) font weight to the title.
GlobalAlert.Button props
Renders the button with basic (minimal) styling.