Component

Panel

Used on confirmation or results pages to highlight important content.

Search for usage of this component on GitHub.

How it looks (preview) (preview all)

Application complete

Your reference number
HDJ2123F

How to call this component

<%= render "govuk_publishing_components/components/panel", {
  title: "Application complete",
  description: sanitize("Your reference number<br>
    <strong>HDJ2123F</strong>
    ")
} %>

GOV.UK Design System

This component incorporates components from the GOV.UK Design System:

Accessibility acceptance criteria

  • have a text colour contrast ratio of more than 4.5:1 with its background to be visually distinct

Other examples

Standard options

This component uses the component wrapper helper. It accepts the following options and applies them to the parent element of the component. See the component wrapper helper documentation for more detail.

  • id - accepts a string for the element ID attribute
  • data_attributes - accepts a hash of data attributes
  • aria - accepts a hash of aria attributes
  • classes - accepts a space separated string of classes, these should not be used for styling and must be prefixed with js-
  • margin_bottom - accepts a number from 0 to 9 (0px to 60px) using the GOV.UK Frontend spacing scale (defaults to no margin)
  • role - accepts a space separated string of roles
  • lang - accepts a language attribute value
  • open - accepts an open attribute value (true or false)
  • hidden - accepts an empty string, ‘hidden’, or ‘until-found’
  • tabindex - accepts an integer. The integer can also be passed as a string.
  • dir - accepts ‘rtl’, ‘ltr’, or ‘auto’.

No description (preview)

Content has been published

<%= render "govuk_publishing_components/components/panel", {
  title: "Content has been published"
} %>

With prepend (preview)

The clocks go forward 31 March

<%= render "govuk_publishing_components/components/panel", {
  prepend: "The clocks go forward",
  title: "31 March"
} %>

With prepend and append (preview)

The next bank holiday in England and Wales is 19 April Good Friday

<%= render "govuk_publishing_components/components/panel", {
  prepend: "The next bank holiday in England and Wales is",
  title: "19 April",
  append: "Good Friday"
} %>

With different heading level (preview)

This is a H1

<%= render "govuk_publishing_components/components/panel", {
  title: "This is a H1",
  heading_level: 1
} %>