1. Collections Component Guide
  2. Contents list
  3. Underline links
Contents list example

Underline links

By default we do not underline links in this component even though this is the general approach on GOV.UK. This is because some of the examples below (particularly those with numbers) do not work well with underlined links. Instead, this option allows the links to be underlined where appropriate.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/contents_list", {
  underline_links: true,
  contents: [
    {
      href: "#first-thing",
      text: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
    },
    {
      href: "#second-thing",
      text: "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
    },
    {
      href: "#third-thing",
      text: "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."
    }
  ]
} %>