--- url: "https://design-system.service.gov.uk/components/panel/" titulek: "Panel – GOV.UK Design System" h1: "Panel" popis: "Use the Panel component to display important information in within confirmation and interruption pages" jazyk: "en" kanonicka: "https://design-system.service.gov.uk/components/panel/" drobecky: ["Home", "Components"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 01:21:52" znaku: 13087 slov: 2006 kodovani: "utf-8" sha256: "c1dc4af63de962a60fdffa6f55c630b042dfd48e54a601bc01614ab650765f59" --- # Panel The Panel component is a visible container used to highlight important content. - HTML - Nunjucks HTML ```

Application complete

Your reference number
HDJ2123F
``` Nunjucks 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. Deprecated options are marked as “Deprecated”. 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](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting). Primary options string **Required.** If `titleHtml` is set, this is not required. Text to use within the panel. If `titleHtml` is provided, the `titleText` option will be ignored. string **Required.** If `titleText` is set, this is not required. HTML to use within the panel. If `titleHtml` is provided, the `titleText` option will be ignored. integer Heading level, from `1` to `6`. Default is `1`. string **Required.** If `html` is set, this is not required. Text to use within the panel content. If `html` is provided, the `text` option will be ignored. string **Required.** If `text` is set, this is not required. HTML to use within the panel content. If `html` is provided, the `text` option will be ignored. nunjucks-block Not strictly a parameter but [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block enables you to call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you will need to wrap the entire panel component in a `call` block. string Classes to add to the panel container. object HTML attributes (for example data attributes) to add to the panel container. object Can be used when creating an [interruption panel](https://design-system.service.gov.uk/components/panel/#interruption-panel) which will add a button or link. Default is `button` unless you set `href` which will show the action as a link. See macro options for actions. Options for `actions` object array The list of buttons or links to display at the end of an Interruption panel. See macro options for actions items. string The additional classes that you want to add to the `govuk-panel__actions` element that wraps the buttons or links. object The additional attributes that you want to add to the `govuk-panel__actions` element that wraps the buttons or links. For example, data attributes. Options for actions `items` array objects string **Required.** The button or link text. string The type of button – `"button"` or `"submit"`. If `href` is provided, set `type` to `"button"` render a link styled as a button. string The `href` for a link. Set `type` to `"button"` and set `href` to render a link styled as a button. string The additional classes that you want to add to the button or link. object The additional attributes that you want to add to the button or link. For example, data attributes. ``` {% from "govuk/components/panel/macro.njk" import govukPanel %} {% call govukPanel({ titleText: "Application complete" }) %} Your reference number
HDJ2123F {% endcall %} ``` ## When to use this component Use the Panel component to display important information within: - [Confirmation pages](/patterns/confirmation-pages/) , which tell the user they’ve successfully completed the transaction - [Interruption pages](/patterns/interruption-pages/) , which pause the user journey to give important information ## When not to use this component Never use the Panel component to highlight any other information. ## How it works There are 2 ways to use the panel component. You can use HTML or, if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](https://prototype-kit.service.gov.uk), you can use the Nunjucks macro. ### Confirmation panel The confirmation panel is part of a [Confirmation page](/patterns/confirmation-pages/) and tells the user the outcome of their journey as a heading. You might also give more detailed information as description text. - HTML - Nunjucks HTML ```

Application complete

Your reference number
HDJ2123F
``` Nunjucks 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. Deprecated options are marked as “Deprecated”. 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](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting). Primary options string **Required.** If `titleHtml` is set, this is not required. Text to use within the panel. If `titleHtml` is provided, the `titleText` option will be ignored. string **Required.** If `titleText` is set, this is not required. HTML to use within the panel. If `titleHtml` is provided, the `titleText` option will be ignored. integer Heading level, from `1` to `6`. Default is `1`. string **Required.** If `html` is set, this is not required. Text to use within the panel content. If `html` is provided, the `text` option will be ignored. string **Required.** If `text` is set, this is not required. HTML to use within the panel content. If `html` is provided, the `text` option will be ignored. nunjucks-block Not strictly a parameter but [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block enables you to call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you will need to wrap the entire panel component in a `call` block. string Classes to add to the panel container. object HTML attributes (for example data attributes) to add to the panel container. object Can be used when creating an [interruption panel](https://design-system.service.gov.uk/components/panel/#interruption-panel) which will add a button or link. Default is `button` unless you set `href` which will show the action as a link. See macro options for actions. Options for `actions` object array The list of buttons or links to display at the end of an Interruption panel. See macro options for actions items. string The additional classes that you want to add to the `govuk-panel__actions` element that wraps the buttons or links. object The additional attributes that you want to add to the `govuk-panel__actions` element that wraps the buttons or links. For example, data attributes. Options for actions `items` array objects string **Required.** The button or link text. string The type of button – `"button"` or `"submit"`. If `href` is provided, set `type` to `"button"` render a link styled as a button. string The `href` for a link. Set `type` to `"button"` and set `href` to render a link styled as a button. string The additional classes that you want to add to the button or link. object The additional attributes that you want to add to the button or link. For example, data attributes. ``` {% from "govuk/components/panel/macro.njk" import govukPanel %} {% call govukPanel({ titleText: "Application complete" }) %} Your reference number
HDJ2123F {% endcall %} ``` ### How to write confirmation panel text Keep your panel text brief, as it’s only meant for a high-level explanation of what has happened. Aim to use short words and phrases to make sure highlighted information is easy to read at different screen sizes. For example, shorter amounts of information are less likely to wrap around the panel, which can happen when using the zoom function on mobiles. ## Interruption panel The interruption panel is part of an [Interruption page](/patterns/interruption-pages/) and shows the user important information that they’d miss if shown any other way. Within the panel is a button that the user must interact with to resume their journey. The information itself is usually shown as heading with some description text, possibly with bullet points and numbered steps. - HTML - Nunjucks HTML ```

Is your age correct?

You entered your age as 109.

``` Nunjucks 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. Deprecated options are marked as “Deprecated”. 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](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting). Primary options string **Required.** If `titleHtml` is set, this is not required. Text to use within the panel. If `titleHtml` is provided, the `titleText` option will be ignored. string **Required.** If `titleText` is set, this is not required. HTML to use within the panel. If `titleHtml` is provided, the `titleText` option will be ignored. integer Heading level, from `1` to `6`. Default is `1`. string **Required.** If `html` is set, this is not required. Text to use within the panel content. If `html` is provided, the `text` option will be ignored. string **Required.** If `text` is set, this is not required. HTML to use within the panel content. If `html` is provided, the `text` option will be ignored. nunjucks-block Not strictly a parameter but [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block enables you to call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you will need to wrap the entire panel component in a `call` block. string Classes to add to the panel container. object HTML attributes (for example data attributes) to add to the panel container. object Can be used when creating an [interruption panel](https://design-system.service.gov.uk/components/panel/#interruption-panel) which will add a button or link. Default is `button` unless you set `href` which will show the action as a link. See macro options for actions. Options for `actions` object array The list of buttons or links to display at the end of an Interruption panel. See macro options for actions items. string The additional classes that you want to add to the `govuk-panel__actions` element that wraps the buttons or links. object The additional attributes that you want to add to the `govuk-panel__actions` element that wraps the buttons or links. For example, data attributes. Options for actions `items` array objects string **Required.** The button or link text. string The type of button – `"button"` or `"submit"`. If `href` is provided, set `type` to `"button"` render a link styled as a button. string The `href` for a link. Set `type` to `"button"` and set `href` to render a link styled as a button. string The additional classes that you want to add to the button or link. object The additional attributes that you want to add to the button or link. For example, data attributes. ``` {% from "govuk/components/panel/macro.njk" import govukPanel %} {% from "govuk/components/button/macro.njk" import govukButton %} {% call govukPanel({ classes: "govuk-panel--interruption", titleText: "Is your age correct?", actions: { items: [ { text: "Yes, this is correct", href: "#", type: "button" }, { text: "No, change my age", href: "#" } ] } }) %}

You entered your age as 109.

{% endcall %} ``` ## Help improve this component To help make sure that this page is useful, relevant and up to date, you can: - take part in the [‘Panel’ discussion on GitHub](https://github.com/alphagov/govuk-design-system-backlog/issues/55) and share your research - [propose a change on GitHub](https://github.com/alphagov/govuk-design-system/edit/main/src/components/panel/index.md) – read more about [how to propose changes in GitHub](/community/propose-a-content-change-using-github/) ## Need help? If you’ve got a question about the GOV.UK Design System, [contact the team](/contact/).