1. Government Frontend Component Guide
  2. Contents list
  3. Active content link
Contents list example

Active content link

An active state allows for “you are here” items in a contents list that spans different pages to avoid linking back to the current page.

How it looks (preview)

How to call this example

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