Skip to content

Add interruption panel#6636

Open
frankieroberto wants to merge 3 commits into
alphagov:mainfrom
x-govuk:add-interruption-panel
Open

Add interruption panel#6636
frankieroberto wants to merge 3 commits into
alphagov:mainfrom
x-govuk:add-interruption-panel

Conversation

@frankieroberto
Copy link
Copy Markdown
Contributor

At the NHS we’ve just published the Interruption panel variant, to support the Interruption page pattern.

This is based on the longstanding pattern used across GOVUK services (see backlog thread), and the excellent guidance from Ministry of Justice Interruption card component.

This pull request proposes adding the same pattern to the GOV.UK Design System.

Like the NHS one, it uses a variant of the Panel component rather than creating a new component. Unlike the NHS one, as well as setting the background colour to blue, it also sets the text as left-aligned (this is because the default green one is centre-aligned, unlike the NHS version).

Links and buttons currently require govuk-button--inverse or govuk-link--inverse modifiers, however these could default to white instead, when used within the panel.

Comment thread packages/govuk-frontend/src/govuk/components/panel/panel.yaml Outdated
@romaricpascal
Copy link
Copy Markdown
Member

Thanks for proposing this @frankieroberto ! We're currently all hands on deck finalising v6.0 so we've added a reminder to our roadmap to prioritise having a look after we're through 😊

@frankieroberto
Copy link
Copy Markdown
Contributor Author

@romaricpascal thank you! Would you mind approving the workflow again so I can check the tests are now passing? Good luck with v6!

@kellylee-gds kellylee-gds added the epic Epics are used in planning project boards to group related stories label Feb 5, 2026
@frankieroberto
Copy link
Copy Markdown
Contributor Author

Well done on getting v6 out! 🙌

Can I nudge you on reviewing the interruption panel suggestion when you a moment? Happy to help with any guidance if needed.

@kellylee-gds kellylee-gds moved this from Needs review 🔍 to Backlog 🏃🏼‍♀️ in GOV.UK Design System cycle board Feb 26, 2026
@kellylee-gds
Copy link
Copy Markdown
Contributor

Sorry for the delay @frankieroberto. Following v6, we've had to pivot to focus on some organisational changes which has taken us away from our regular sprint work. We're hoping to review your suggestion in the next few weeks 🙏🏻

@calvin-lau-sig7
Copy link
Copy Markdown
Contributor

Hi @frankieroberto, thanks for making this contribution. We’ve put together a small squad to think about this. We’re supportive of publishing this as a variant in the Panel component. To do this, we’d still need some things.

Minimal usage guidance:

  • when to use
  • how to use (where can the panel be placed, such as interruption page only? consider MoJ use cases?)
  • what can go into the panel
  • where within a journey it’s been used in live services

Summary of relevant supporting evidence:

  • evidence of use in live services
  • evidence it’s been tested with users

Other things to consider:

  • adding action links, similar to the MoJ component

Would you be able to help put some of this together? We thought you’ve probably got a view of most of this already.

@frankieroberto
Copy link
Copy Markdown
Contributor Author

@calvin-lau-sig7 I’m happy to help but I don’t have loads of time at the moment. We collated some examples from the NHS for our design system: https://service-manual.nhs.uk/design-system/patterns/interruption-page – you’re welcome to borrow any of that.

I’m a bit out of the loop now on GOV.UK branded services, but I’m sure there are some live examples (a few on alphagov/govuk-design-system-backlog#27 ) - could be worth asking on the cross-gov Slack?

The MOJ team did a lot of working looking into it too for their pattern so they may have some more examples from live services.

@frankieroberto
Copy link
Copy Markdown
Contributor Author

@calvin-lau-sig7 oh and for the action links, I think rather than supporting primaryAction and secondaryAction like the MOJ component, it’s simpler and more flexible to instead rely on passing html into the panel component, and then use Button components or links within the panel for the actions. They can be grouped using the existing <div class="govuk-button-group"> code if needed.

That’s the approach we took on the NHS design system anyway.

The guidance can still suggest only using a single button, with or without a link, but the component itself is flexible.

There are already --inverse variants of the govuk buttons and links, so those aren’t needed. The only decision you’d need to make is whether to apply the inverse styles automatically to buttons and links in the interruption panel component using CSS selectors, or whether to require users to add them manually. (Depends on how you interpret the Sass philosophy!)

@calvin-lau-sig7
Copy link
Copy Markdown
Contributor

Good stuff, thanks @frankieroberto! Just checking how involved you wanted or could be on this.
We'll get together to put a bit of planning for this next week.

@frankieroberto
Copy link
Copy Markdown
Contributor Author

@calvin-lau-sig7 feel free to invite me to anything and I'll come if I can!

Would you also mind approving the workflow so we can check that the tests still pass? Is it also possible to trigger the preview deployment so that you can all see proposed component variant?

@owenatgov
Copy link
Copy Markdown
Contributor

@frankieroberto It just needs a rebase because we've fiddled with the required tests. Gimme a sec I can do it

@frankieroberto
Copy link
Copy Markdown
Contributor Author

@owenatgov have added you to the fork at https://github.com/x-govuk/govuk-frontend - free free to push to the branch!

In common with other components, the panel doesn't meet the AAA contrast ratio of 7:1 for small text (under 24px)

The contrast ratio for white text on blue panels is 5.16:1

The contrast ratio for white text on green panels is 4.52:1  (however by default these use large text)
@owenatgov owenatgov force-pushed the add-interruption-panel branch from 8b5d672 to 7839346 Compare April 17, 2026 10:24
@owenatgov
Copy link
Copy Markdown
Contributor

@frankieroberto Aha that's that permission problem I was getting sorted 😁 Thanks! Done. Tests should run as normal now.

@owenatgov
Copy link
Copy Markdown
Contributor

Those test failures are coming from our new snapshot tests which we've introduced as part of the wider work to move from @import to @use. I would say it's fine to not worry about them for right now, since the other relevant tests are passing.

@frankieroberto
Copy link
Copy Markdown
Contributor Author

@owenatgov thanks! Is it possible to get the preview deploying, or does that not work from contributions from outside the team?

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-6636 April 17, 2026 12:39 Inactive
@owenatgov
Copy link
Copy Markdown
Contributor

@frankieroberto Ah sorry I glossed over that part of your earlier comment. I've just created one.

@calvin-lau-sig7
Copy link
Copy Markdown
Contributor

calvin-lau-sig7 commented Apr 30, 2026

Hi @frankieroberto, wanted to give an update on behalf of the team again.

We've done some desk research to gather the use cases and supporting evidence. We've concluded that the most practical and suitable solution for us to publish this is to:

  1. Add 'Interruption' as a type of panel in the 'Panel' component.
  2. Publish a new 'Interruption page' pattern, fairly minimal, likely similar in size and guidance detail as the 'Confirmation page', relying on existing guidance and linking to the NHS and MoJ Design Systems.

We're expecting to have something ready to review as a revamped PR/preview in a few weeks time!

@frankieroberto
Copy link
Copy Markdown
Contributor Author

@calvin-lau-sig7 nice! We took a similar decision to make it a variant of the Panel component rather than its own component (although MOJ Design System made it a standalone component).

We did briefly debate what modifier to use in the CSS, considering --blue, but quickly settled on --interruption to try and signal that this shouldn’t be used for other purposes.

You’ll also have to consider whether to apply the govuk-button--inverse and govuk-link--inverse modifiers automatically to buttons and links within govuk-panel--interruption, or whether to require users to add the classes.

@kellylee-gds
Copy link
Copy Markdown
Contributor

Hey @frankieroberto. We'd like to hold a show & tell to demo what we've built as a result of your contribution. We're also inviting the MoJ design system folks and we've used their Interruption card to also inform this component and pattern.

Are there any days / times which work particularly well for you to join a show & tell? Also feel free to invite other folks from your team too!

@frankieroberto
Copy link
Copy Markdown
Contributor Author

Hey @frankieroberto. We'd like to hold a show & tell to demo...

Woohoo 🎉 I'll DM you to discuss dates and times 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

epic Epics are used in planning project boards to group related stories panel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants