NotificationNew

Notifications provide important information that requires action or acknowledgement. A notification is displayed until the user dismisses it.

Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
View RTL
<nord-notification-group>
  <nord-notification>
    <h2>Patient arrived</h2>
    <p>Ariel Salminen arrived to clinic with Pixie cat.</p>
    <a href="#">Start consultation</a>
  </nord-notification>
</nord-notification-group>

<script>
  const group = document.querySelector("nord-notification-group")
  group.addEventListener("dismiss", e => e.target.remove())
</script>

Events

EventDescriptionType
dismiss

Fired when the notification is dismissed, and its exit animation has completed. This event should be used to remove the dismissed notification from the DOM.

NordEvent

Slots

Slot nameDescription
Default slot

Default slot used for the notification text/message.

icon

Slot used for the notification icon.

Methods

Method nameParametersDescription
dismiss() => voidN/A

Programmatically dismiss the notification. The returned promise resolves when notification's exit animation is complete.

Localization

This component requires localization in a multi-lingual application. The following keys are required when registering a translation:

KeyDescription
dismissLabel

Accessible label for the dismiss button.

For full localization guidelines, please see Localization documentation.

Localization Guidelines


Dependencies

This component is internally dependent on the following components:


Usage #

This section includes guidelines for designers and developers about the usage of this component in different contexts.

Do #

  • Use for short messages that describe the purpose of the notification.
  • Use for important updates that require user action/attention.
  • Provide a single call to action within the notification.
  • Use in combination with Notification group so that notifications get styled and positioned correctly.

Don’t #

  • Don’t use for transient or unimportant messages. Consider using a Toast instead.
  • Don't remove a notification until a user has explicitly dismissed, or acted on the notification.
  • Don’t use for error messages unless absolutely necessary. Try to favor a Banner for error messaging instead.

Content guidelines #

Notification content should be clear, accurate and easy to understand:

Ariel Salminen arrived to clinic with Pixie cat.
Patient arrived

When writing the notification content, be concise. Keep content to 1 to 2 sentence:

You’ve reached the limit of 30 users included in your plan. Upgrade to add more.
You have reached the user limit. Your clinic can only have a maximum of 30 users. To add more users, remove users you no longer need or upgrade your plan to add more.

When writing the notification content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):

Ariel Salminen arrived to clinic with Pixie cat.
Ariel Salminen Arrived To Clinic With Pixie Cat.

Always end in punctuation:

Ariel Salminen arrived to clinic with Pixie cat.
Ariel Salminen arrived to clinic with Pixie cat

Action link labels in notifications should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:

Start consultation
Click here

When writing action link labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):

Start consultation
Start Consultation

Avoid unnecessary words and articles in action link labels, such as “the”, “an” or “a”:

Add item
Add an item

Integration

For integration guidelines, please see Web Components documentation. This documentation explains how to implement and use Nord Web Components across different technologies such as Vue.js, React, or Vanilla JavaScript.

Integration Guidelines

Troubleshooting

If you experience any issues while using Nord Web Components, please head over to the Support page for more guidelines and ways to contact us.


Was this page helpful?

YesNo
Send feedback

We use this feedback to improve our documentation.