1. Component Guide
  2. Success alert
  3. With styled link
Success alert example

With styled link

If you need to include a link in your success alert, you need to specify the govuk-link and govuk-notification-banner__link classes on that link element. This is in line with GOV.UK Design System guidance that the colour of the link in success notification banners can look jarring if any links are a different colour to the principal colour used by the success banner.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/success_alert", {
  message: "Message to alert the user to a successful action goes here",
  description: sanitize("<p class=\"govuk-body\">A further description with <a href=\"/a-cool-page\" class=\"govuk-link govuk-notification-banner__link\">a link</a></p>")
} %>