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 - announcement
Use an announcement panel is used to display important messages that should be seen by all users but are not directly related to the page content. For example, issues with an entire service.
{% from "components/panel/_macro.njk" import onsPanel %}
{%
call onsPanel({
"variant": 'announcement'
})
%}
<p class="ons-u-mb-no">National lockdown: stay at home</p>
<div class="ons-u-fs-r">
<p>Coronavirus (COVID-19) remains a serious threat across the country. <a href="#0">Find out more</a></p>
</div>
{% endcall %}
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