- A-Z
- Accordion
- Acronym
- Action
- Alert
- Breadcrumbs
- Button
- Card
- Checkboxes
- Confirmation
- Cookie banner
- Copy
- Date input
- Details
- Env
- Error summary
- Filter
- Footer
- Forms
- Group
- Header
- Help
- Hero
- Hr
- Input
- Leave site
- Notification
- Pagination
- Panel
- Progress
- Radios
- Search input
- Select
- Signage
- Skip link
- Status
- Steps
- Summary list
- Table
- Tabs
- Textarea
- Time input
Your web browser is out of date
Your web browser (the software you use to access the internet) is out of date. You need to update it or use a different web browser to ensure you can complete this form.
Panel
The Panel component is a full-width section used to highlight content that sits outside the main content of a page.
The component helps draw attention to supporting information such as a feature, related guidance, or supplementary detail without interrupting the primary page flow.
<div class="asp-panel">
<div class="asp-container">
<div class="asp-grid">
<div class="asp-grid__item asp-grid__item--large-three-quarters asp-grid__item--extra-large-two-thirds">
<h2>Panel title</h2>
<p>Panel content (html).</p>
<p>With additional line.</p>
</div>
</div>
</div>
</div>
Nunjucks macro options
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
Some options are required for the macro to work; these are marked as "Required" in the option description.
If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.
| Name | Type | Description |
|---|---|---|
| content | object | Required. The panel component content. See content. |
Options for content
| Name | Type | Description |
|---|---|---|
| html | string | Required. HTML for the panel component content. If 'html' is provided, the 'text' parameter will be ignored. |
| text | string | Required. Text for the panel component content. If 'html' is provided, the 'text' parameter will be ignored. |
{% from "components/panel/macro.njk" import aspPanel %}
{{ aspPanel({
content: {
html: "<h2>Panel title</h2>\n<p>Panel content (html).</p>\n<p>With additional line.</p>\n"
}
}) }}
Twig macro options
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
Some options are required for the macro to work; these are marked as "Required" in the option description.
If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.
| Name | Type | Description |
|---|---|---|
| content | object | Required. The panel component content. See content. |
Options for content
| Name | Type | Description |
|---|---|---|
| html | string | Required. HTML for the panel component content. If 'html' is provided, the 'text' parameter will be ignored. |
| text | string | Required. Text for the panel component content. If 'html' is provided, the 'text' parameter will be ignored. |
{% from "components/panel/macro.njk" import aspPanel %}
{{ aspPanel({
content: {
html: "<h2>Panel title</h2>\n<p>Panel content (html).</p>\n<p>With additional line.</p>\n"
}
}) }}
<div class="asp-panel">
<div class="asp-container">
<div class="asp-grid">
<div class="asp-grid__item asp-grid__item--large-three-quarters asp-grid__item--extra-large-two-thirds">
<p>Panel content (text only).</p>
</div>
</div>
</div>
</div>
Nunjucks macro options
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
Some options are required for the macro to work; these are marked as "Required" in the option description.
If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.
| Name | Type | Description |
|---|---|---|
| content | object | Required. The panel component content. See content. |
Options for content
| Name | Type | Description |
|---|---|---|
| html | string | Required. HTML for the panel component content. If 'html' is provided, the 'text' parameter will be ignored. |
| text | string | Required. Text for the panel component content. If 'html' is provided, the 'text' parameter will be ignored. |
{% from "components/panel/macro.njk" import aspPanel %}
{{ aspPanel({
content: {
text: "Panel content (text only)."
}
}) }}
Twig macro options
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
Some options are required for the macro to work; these are marked as "Required" in the option description.
If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.
| Name | Type | Description |
|---|---|---|
| content | object | Required. The panel component content. See content. |
Options for content
| Name | Type | Description |
|---|---|---|
| html | string | Required. HTML for the panel component content. If 'html' is provided, the 'text' parameter will be ignored. |
| text | string | Required. Text for the panel component content. If 'html' is provided, the 'text' parameter will be ignored. |
{% from "components/panel/macro.njk" import aspPanel %}
{{ aspPanel({
content: {
text: "Panel content (text only)."
}
}) }}
When to use this component
Use the Panel component when you need to present content that is related to the page but separate from the main body of information. This includes:
- Feature highlights or promotional content
- Supplementary guidance or related links
- Supporting information that benefits from visual separation
- Content that should be noticed but does not require a notification or alert
The purpose of the component is to give content a distinct visual treatment so users can easily distinguish supplementary sections from the main page content.
When not to use this component
Do not use the Panel component for critical warnings, errors, or time-sensitive information.
Use a notification or alert component instead when content requires immediate attention or conveys severity.
Before using this component, consider:
- Whether the content belongs in the main page flow rather than as a separate section
- Whether a notification would better communicate the importance of the message
- Whether the panel content needs a clear heading for context and accessibility
- Whether the amount of content justifies a full-width highlighted section
Example of where we have used this component
This component is used on:
- Tasks
- Microsites
- Action cards
This list is not exhaustive.
Status of development
The below criteria all need to be met for a component to be considered as fully developed for use within the ASP Digital Design System.
| Development criteria | Status |
|---|---|
| WCAG 2.2 compliant | Not started |
| WCAG 2.1 compliant | Completed |
| HTML / Nunjucks version | Completed |
| Figma version | Not started |
| M365 versions | Not started |
| Documentation | Not started |
Make a change to the Design System
Suggest an edit to this system, or any of the components in it, by submitting a Design System change request.
Published 15 June 2026
Last updated 16 June 2026