1. Government Frontend Component Guide
  2. Contents list
  3. Formats numbers
Contents list example

Formats numbers

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/contents_list", {
  format_numbers: true,
  contents: [
    {
      href: "#first-thing",
      text: "1. First thing"
    },
    {
      href: "#two",
      active: true,
      text: "2. Second thing"
    },
    {
      href: "#third-thing",
      text: "3. Third thing"
    }
  ]
} %>