1. Component Guide
  2. Success alert
  3. With custom title
Success alert example

With custom title

This is for the heading element at the head of the component (reading “Success” by default) where the id is used by an aria-labelledby on screen reader focus of the element.

Please ensure that this id is unique across the view you are building.

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",
  title_id: "my-custom-success-id"
} %>