Contents list example

With bottom margin

The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the GOV.UK Frontend spacing scale. The default margin bottom is 20px (govuk-spacing(4)).

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/contents_list", {
  margin_bottom: 9,
  contents: [
    {
      href: "#first-thing",
      text: "First thing"
    },
    {
      href: "#second-thing",
      text: "Second thing"
    },
    {
      href: "#third-thing",
      text: "Third thing"
    }
  ]
} %>