Use up and down keys to navigate results once you've typed more than two characters. Use the enter key to select a result. Touch device users, explore by touch or with swipe gestures.
Panel - success
Overview
Use the success panel following a submit button to confirm that the user has completed their overall task.
{% from "components/panel/_macro.njk" import onsPanel %}
{{
onsPanel({
"variant": 'success',
"id": 'success-id',
"iconType": 'check',
"body": 'Information has been successfully submitted'
})
}}
Nunjucks macro options
Name
Type
Required
Description
body
string
true
The contents of the panel. This can contain HTML.
title
string
false
The title for the error summary panel
headingLevel
int
false
Number used to determine the heading level of the title. Use to ensure the title has a correct semantic order on the page. Defaults to 2
type
string
false
A single value to adjust the component using available variants: “success”, “warn”, “ghost”, “bare”, “error”, “branded”, “warn-branded”, and “announcement”
spacious
boolean
false
Set to “true” to double the padding spacing surrounding the body content if required
classes
string
false
Custom classes to add to the panel
id
string
false
The HTML id for the panel
attributes
object
false
HTML attributes to apply to the panel (for example, data attributes)
assistiveTextPrefix
string
false
Sets the visually hidden prefix text for screen readers. Default values for each panel type:
information and branded – “Important information: ”
success – “Completed: ”
warn and warn-branded – “Warning: ”
error– “Error: ”
iconType
string
false
Adds an icon to the panel, before the body content, by setting the icon type
iconSize
string
false
Icon size can be set to match the size of the body content text as detailed in the typography type scale
Only use this component to confirm the user has completed an overall process. For example at the end of a survey.
Do not use this component to confirm more granular tasks such submitting information throughout a survey.
How to use this component
This example uses the iconType parameter to show the check icon in the panel. The size of the icon can be set to match the size of the font used in the panel.