Components

Task list

The task list component displays all the tasks a user needs to do, and allows users to easily identify which ones are done and which they still need to do.

Rendering...
Rendering...
Props
NameTypeDefaultDescription
idstring-'id' attribute to place on the base HTML element
classBlockstring"govuk-task-list"Block name override in BEM style classes applied to all elements
classModifiersModifiers-BEM style modifiers to apply to the base HTML element
classNamestring-Extra classes to apply to the base HTML element
itemsTaskListItemProps[]-REQUIRED. Tasks to be listed

When to use this component

Use the task list to give users more control over how they complete long, complex services.

Only use the task list if there’s evidence that users:

  • do not want to, or cannot, complete all the tasks in one sitting
  • need to be able to choose the order they complete the tasks in

When not to use this component

Try to simplify the service before you use a task list. If you’re able to reduce the number of tasks or steps involved, you might not need one.

Do not use the task list for a long service that needs to be completed in a specific order. If it needs to be completed over multiple sessions, consider allowing users to save their progress, and then to continue where they left off when they return. Use the start page to explain what users will be expected to do during the service.

The task list should not be used as a way of showing users their answers. For this, you should use a Summary list component instead.

How it works

Users should be able to complete tasks in whatever order they like.

The status alongside the task indicates whether they can start it. Users can select a task to start completing it. Once they have completed it and returned to the task list, the status for that task will have changed to ‘Completed’.

Users can only move on from the task list when all tasks are shown as ‘Completed’.

Read the Complete multiple tasks pattern guidance for more information on how to use the task list within a service.

Tasks

Tasks are usually actions that the user needs to take to complete a service. In a task list, the user should be able to choose to complete tasks in any order that works for them.

Each task within a task list includes a task name and a status. It can also include hint text if you decide this is needed.

The whole row is linked, allowing users to select anywhere within it to start the task. Leave out the href of a task that the user cannot start yet, so that its row is not linked.

Write clear task descriptions

The task name gives users a reasonable expectation of what that task is about. For example, ‘Your contact details’ or ‘Upload evidence’. Use sentence case, and keep it short. Users of screen readers might find it difficult to navigate the task list if the task names are too long.

If you’re finding it difficult to come up with a clear and concise task name, it might be because the task itself is too complex and may need to be separated into smaller tasks. Group questions and actions into tasks in a way that makes sense to users, based on their needs.

Adding hint text

Only use hint text if there is evidence that the user needs more information about what the task will include.

Keep hint text to a single short sentence, without any full stops. Screen readers will read out the entire text when users interact with the task link. This could frustrate users if the text is long.

Do not include links within the hint text. The whole task row links users to the task itself, so any links within the hint text will not work.

Grouping tasks

If there are a lot of tasks to complete, you might find that grouping them makes it easier for users to understand and plan what they need to do. Tasks can be grouped into separate task lists on a page. Give each task list a short heading that clearly explains the grouping.

Give each task list on a page its own id, so that the ids of the tasks, hints and statuses in each list are unique.

Read the Complete multiple tasks pattern guidance for more information on grouping tasks.

Check before you start

Prepare application

Rendering...
Rendering...

Statuses

Statuses use colour and a short descriptor to give users a quick overview of how much of the task list they have completed, and how much is left to do.

A status can be plain text or a Tag component. Use the cannot-start-yet status modifier to show that a task cannot be started yet.

Read the Complete multiple tasks pattern guidance for more information on status colours and text.

Rendering...
Rendering...