Contents list example

Nested contents lists

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/contents_list", {
  contents: [
    {
      href: "#first-thing",
      text: "First thing"
    },
    {
      href: "#second-thing",
      text: "Second thing"
    },
    {
      href: "#third-thing",
      text: "Third thing",
      items: [
        {
          href: "#sub-third-thing",
          text: "Sub third thing"
        },
        {
          href: "#another-third-thing",
          text: "Another third thing"
        }
      ]
    },
    {
      href: "#fourth-thing",
      text: "Fourth thing"
    }
  ]
} %>