Skip to main content
Claimant navigation - primary

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
attributes object HTML attributes (for example Aria attributes).
items array Array of object navigation items, see items

Options for items array object

Name Type Description
text string Required. Text for the navigation item.
href string URL of the navigation item anchor.
active boolean Flag to mark the navigation item as active.