Standard component
Nunjucks macro options
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
Some options are required for the macro to work; these are marked as "Required" in the option description.
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.
Name | Type | Description |
---|---|---|
items | array | An array of items ordered chronologically that are displayed on the timeline, see items |
headingLevel | string | Allows you to change the heading level of the item header, defaults to an h2 |
classes | string | Additional classes to add to the timeline |
attributes | object | HTML Attributes (data attributes) to add to the timeline |
Options for items array object
Name | Type | Description |
---|---|---|
date | string | The date and time of the item |
title | string | Required. The title of the item |
byline | string | Required. Who or what produced the item |
description | object | Description of the item, see items description |
link | object | The date of the event, see items link |
Options for items description object
Name | Type | Description |
---|---|---|
text | string | If text is set, this is not required. HTML to use within the item label. If html is provided, the text argument will be ignored. |
html | string | If html is set, this is not required. Text to use within the item label. If html is provided, the text argument will be ignored. |
Options for items link object
Name | Type | Description |
---|---|---|
href | string | Value of the link’s href attribute for an item link. |
text | string | Text to use within links link item. |
visuallyHiddenText | string | Addtional text added to the link to give context |