Skip to content
  • System
  • Light
  • Dark
  • High contrast

NotificationBanner

Banner vs Toast. Use NotificationBanner for persistent, page-level messages that describe the current state (e.g. a form submission error or a maintenance warning). Use Toast for ephemeral confirmations of a completed action (e.g. “Report saved”).

Scheduled maintenance

The system will be unavailable on Saturday 29 March between 02:00 and 04:00.

import { NotificationBanner } from '@eekodigital/raster';

<NotificationBanner variant="info" title="Scheduled maintenance">
  The system will be unavailable on Saturday 29 March between 02:00 and 04:00.
</NotificationBanner>

Application submitted

Your application has been received and will be reviewed within 5 working days.

<NotificationBanner variant="success" title="Application submitted">
  Your application has been received and will be reviewed within 5 working days.
</NotificationBanner>

Action required

You have 3 reports that are past their due date.

<NotificationBanner variant="warning" title="Action required">
  You have 3 reports that are past their due date.
</NotificationBanner>

Submission failed

There was a problem saving your changes. Please try again or contact support.

<NotificationBanner variant="danger" title="Submission failed">
  There was a problem saving your changes. Please try again or contact support.
</NotificationBanner>

Omit children when a short heading is sufficient.

Changes saved successfully

<NotificationBanner variant="success" title="Changes saved successfully" />

Omit title for a plain message without a heading.

Your session will expire in 5 minutes.

<NotificationBanner variant="info" aria-label="Session expiry notice">
  Your session will expire in 5 minutes.
</NotificationBanner>
PropTypeDefaultDescription
variant’info’ | ‘success’ | ‘warning’ | ‘danger''info’Controls the colour scheme and icon.
titlestringOptional bold heading displayed above the body.
childrenReactNodeOptional body content below the title.
role’alert’ | ‘status’ | ‘region''region’

ARIA live region role. Use ‘alert’ for urgent errors, ‘status’ for low-priority updates, ‘region’ for static contextual information.