Summary list
Nunjucks macro options
Use options to customise the appearance, content and behaviour of this component when using a macro, for example, changing the text.
Also see the guidance on the Summary list component page, which shows these options in use within each example.
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.
Primary options
| array |
Required.
The rows within the summary list component.
See macro options for rows.
|
| object |
Can be used to wrap a summary card around the summary list component. If any of these options are present, a summary card will wrap around the summary list.
See macro options for card.
|
| string |
Classes to add to the container.
|
| object |
HTML attributes (for example data attributes) to add to the container.
|
Options for rows key object
| string |
Required.
If html is set, this is not required. Text to use within each key. If html is provided, the text option will be ignored.
|
| string |
Required.
If text is set, this is not required. HTML to use within each key. If html is provided, the text option will be ignored.
|
| string |
Classes to add to the key wrapper.
|
Options for rows value object
| string |
Required.
If html is set, this is not required. Text to use within each value. If html is provided, the text option will be ignored.
|
| string |
Required.
If text is set, this is not required. HTML to use within each value. If html is provided, the text option will be ignored.
|
| string |
Classes to add to the value wrapper.
|
Options for rows actions items array objects
| string |
Required.
The value of the link’s href attribute for an action item.
|
| string |
Required.
If html is set, this is not required. Text to use within each action item. If html is provided, the text option will be ignored.
|
| string |
Required.
If text is set, this is not required. HTML to use within each action item. If html is provided, the text option will be ignored.
|
| string |
Actions rely on context from the surrounding content so may require additional accessible text. Text supplied to this option is appended to the end. Use html for more complicated scenarios.
|
| string |
Classes to add to the action item.
|
| object |
HTML attributes (for example data attributes) to add to the action item.
|
Options for card object
| object |
Data for the summary card header.
See macro options for card title.
|
| object |
The action link content shown in the header of each summary card wrapped around the summary list component.
See macro options for card actions.
|
| string |
Classes to add to the container.
|
| object |
HTML attributes (for example data attributes) to add to the container.
|
Options for card title object
| string |
Text to use within each title. If html is provided, the text option will be ignored.
|
| string |
Text to use within each title. If html is provided, the text option will be ignored.
|
| integer |
Heading level, from 1 to 6. Default is 2.
|
| string |
Classes to add to the title wrapper.
|
Options for card actions object
| array |
The action link items shown in the header within the summary card wrapped around the summary list component.
See macro options for card actions items.
|
| string |
Classes to add to the actions wrapper.
|
Options for card actions items array objects
| string |
Required.
The value of the link’s href attribute for an action item.
|
| string |
Required.
If html is set, this is not required. Text to use within each action item. If html is provided, the text option will be ignored.
|
| string |
Required.
If text is set, this is not required. HTML to use within each action item. If html is provided, the text option will be ignored.
|
| string |
Actions rely on context from the surrounding content so may require additional accessible text. Text supplied to this option is appended to the end. Use html for more complicated scenarios.
|
| string |
Classes to add to the action item.
|
| object |
HTML attributes (for example data attributes) to add to the action item.
|