Summary list
Use the summary list to summarise information, for example, a user’s responses at the end of a form.
<dl class="govuk-summary-list">
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Name
</dt>
<dd class="govuk-summary-list__value">
Sarah Philips
</dd>
<dd class="govuk-summary-list__actions">
<a class="govuk-link" href="#">
Change<span class="govuk-visually-hidden"> name</span>
</a>
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Date of birth
</dt>
<dd class="govuk-summary-list__value">
5 January 1978
</dd>
<dd class="govuk-summary-list__actions">
<a class="govuk-link" href="#">
Change<span class="govuk-visually-hidden"> date of birth</span>
</a>
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Contact information
</dt>
<dd class="govuk-summary-list__value">
72 Guild Street<br>London<br>SE23 6FH
</dd>
<dd class="govuk-summary-list__actions">
<a class="govuk-link" href="#">
Change<span class="govuk-visually-hidden"> contact information</span>
</a>
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Contact details
</dt>
<dd class="govuk-summary-list__value">
<p class="govuk-body">07700 900457</p>
<p class="govuk-body">sarah.phillips@example.com</p>
</dd>
<dd class="govuk-summary-list__actions">
<a class="govuk-link" href="#">
Change<span class="govuk-visually-hidden"> contact details</span>
</a>
</dd>
</div>
</dl>
{% from "govuk/components/summary-list/macro.njk" import govukSummaryList %}
{{ govukSummaryList({
rows: [
{
key: {
text: "Name"
},
value: {
text: "Sarah Philips"
},
actions: {
items: [
{
href: "#",
text: "Change",
visuallyHiddenText: "name"
}
]
}
},
{
key: {
text: "Date of birth"
},
value: {
text: "5 January 1978"
},
actions: {
items: [
{
href: "#",
text: "Change",
visuallyHiddenText: "date of birth"
}
]
}
},
{
key: {
text: "Contact information"
},
value: {
html: "72 Guild Street<br>London<br>SE23 6FH"
},
actions: {
items: [
{
href: "#",
text: "Change",
visuallyHiddenText: "contact information"
}
]
}
},
{
key: {
text: "Contact details"
},
value: {
html: '<p class="govuk-body">07700 900457</p><p class="govuk-body">sarah.phillips@example.com</p>'
},
actions: {
items: [
{
href: "#",
text: "Change",
visuallyHiddenText: "contact details"
}
]
}
}
]
}) }}
When to use this component
Use the summary list component to present pairs of related information, known as key-value pairs, in a list. The key is a description or label of a piece of information, like ‘Name’, and the value is the piece of information itself, like ‘John Smith’.
You can use it to display metadata like ‘Last updated’ with a date like ‘22 June 2018’, or to summarise a user’s responses at the end of a form like the check answers pattern.
When not to use this component
The summary list uses the description list (<dl>
) HTML element, so only use it to present information that has a key and at least one value.
Do not use it for tabular data or a simple list of information or tasks, like a task list. For those use a <table>
, <ul>
or <ol>
.
How it works
There are 2 ways to use the summary list component. You can use HTML or, if you’re using Nunjucks or the GOV.UK Prototype Kit, you can use the Nunjucks macro.
Summary list with actions
You can add actions to a summary list, like a ‘Change’ link to let users go back and edit their answer.
For sighted users, the actions get their context from the other content in the row they appear in.
Assistive technology users, like those who use a screen reader, may hear the links out of context and not know what they do. To give more context, add visually hidden text to the links. This means a screen reader user will hear a meaningful action, like ‘Change name’ or ‘Change date of birth’.
<dl class="govuk-summary-list">
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Name
</dt>
<dd class="govuk-summary-list__value">
Sarah Philips
</dd>
<dd class="govuk-summary-list__actions">
<a class="govuk-link" href="#">
Change<span class="govuk-visually-hidden"> name</span>
</a>
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Date of birth
</dt>
<dd class="govuk-summary-list__value">
5 January 1978
</dd>
<dd class="govuk-summary-list__actions">
<a class="govuk-link" href="#">
Change<span class="govuk-visually-hidden"> date of birth</span>
</a>
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Contact information
</dt>
<dd class="govuk-summary-list__value">
72 Guild Street<br>London<br>SE23 6FH
</dd>
<dd class="govuk-summary-list__actions">
<a class="govuk-link" href="#">
Change<span class="govuk-visually-hidden"> contact information</span>
</a>
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Contact details
</dt>
<dd class="govuk-summary-list__value">
<p class="govuk-body">07700 900457</p>
<p class="govuk-body">sarah.phillips@example.com</p>
</dd>
<dd class="govuk-summary-list__actions">
<a class="govuk-link" href="#">
Change<span class="govuk-visually-hidden"> contact details</span>
</a>
</dd>
</div>
</dl>
{% from "govuk/components/summary-list/macro.njk" import govukSummaryList %}
{{ govukSummaryList({
rows: [
{
key: {
text: "Name"
},
value: {
text: "Sarah Philips"
},
actions: {
items: [
{
href: "#",
text: "Change",
visuallyHiddenText: "name"
}
]
}
},
{
key: {
text: "Date of birth"
},
value: {
text: "5 January 1978"
},
actions: {
items: [
{
href: "#",
text: "Change",
visuallyHiddenText: "date of birth"
}
]
}
},
{
key: {
text: "Contact information"
},
value: {
html: "72 Guild Street<br>London<br>SE23 6FH"
},
actions: {
items: [
{
href: "#",
text: "Change",
visuallyHiddenText: "contact information"
}
]
}
},
{
key: {
text: "Contact details"
},
value: {
html: '<p class="govuk-body">07700 900457</p><p class="govuk-body">sarah.phillips@example.com</p>'
},
actions: {
items: [
{
href: "#",
text: "Change",
visuallyHiddenText: "contact details"
}
]
}
}
]
}) }}
Summary list without actions
<dl class="govuk-summary-list">
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Name
</dt>
<dd class="govuk-summary-list__value">
Sarah Philips
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Date of birth
</dt>
<dd class="govuk-summary-list__value">
5 January 1978
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Contact information
</dt>
<dd class="govuk-summary-list__value">
72 Guild Street<br>London<br>SE23 6FH
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Contact details
</dt>
<dd class="govuk-summary-list__value">
<p class="govuk-body">07700 900457</p>
<p class="govuk-body">sarah.phillips@example.com</p>
</dd>
</div>
</dl>
{% from "govuk/components/summary-list/macro.njk" import govukSummaryList %}
{{ govukSummaryList({
rows: [
{
key: {
text: "Name"
},
value: {
text: "Sarah Philips"
}
},
{
key: {
text: "Date of birth"
},
value: {
text: "5 January 1978"
}
},
{
key: {
text: "Contact information"
},
value: {
html: "72 Guild Street<br>London<br>SE23 6FH"
}
},
{
key: {
text: "Contact details"
},
value: {
html: '<p class="govuk-body">07700 900457</p><p class="govuk-body">sarah.phillips@example.com</p>'
}
}
]
}) }}
Summary list without borders
If you do not include actions in your summary list and it would be better for your design to remove the separating borders, use the govuk-summary-list--no-border
class.
<dl class="govuk-summary-list govuk-summary-list--no-border">
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Name
</dt>
<dd class="govuk-summary-list__value">
Sarah Philips
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Date of birth
</dt>
<dd class="govuk-summary-list__value">
5 January 1978
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Contact information
</dt>
<dd class="govuk-summary-list__value">
72 Guild Street<br>London<br>SE23 6FH
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Contact details
</dt>
<dd class="govuk-summary-list__value">
<p class="govuk-body">07700 900457</p>
<p class="govuk-body">sarah.phillips@example.com</p>
</dd>
</div>
</dl>
{% from "govuk/components/summary-list/macro.njk" import govukSummaryList %}
{{ govukSummaryList({
classes: 'govuk-summary-list--no-border',
rows: [
{
key: {
text: "Name"
},
value: {
text: "Sarah Philips"
}
},
{
key: {
text: "Date of birth"
},
value: {
text: "5 January 1978"
}
},
{
key: {
text: "Contact information"
},
value: {
html: "72 Guild Street<br>London<br>SE23 6FH"
}
},
{
key: {
text: "Contact details"
},
value: {
html: '<p class="govuk-body">07700 900457</p><p class="govuk-body">sarah.phillips@example.com</p>'
}
}
]
}) }}
To remove borders on a single row, use the govuk-summary-list__row--no-border
class.
Research on this component
This component was developed and tested by the Government Digital Services as part of the check answers pattern.
Next steps
More research is needed to find out how well this component works outside the check answers pattern, for example, to present summaries within caseworking systems.
If you use this component in your service, get in touch to share your research findings.
Help improve this page
To help make sure that this page is useful, relevant and up to date, you can:
- share your research or feedback on GitHub
- propose a change – read more about how to propose changes in GitHub
Need help?
If you’ve got a question about the GOV.UK Design System, contact the team.