1. Component Guide
  2. Document list
  3. With margin
Document list example

With margin

The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the GOV.UK Frontend spacing scale. It defaults to having a margin bottom of 5 (25px).

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/document_list", {
  margin_bottom: 9,
  items: [
    {
      link: {
        text: "Alternative provision",
        path: "/government/publications/alternative-provision"
      },
      metadata: {
        public_updated_at: "2016-06-27 10:29:44 +0000",
        document_type: "Statutory guidance"
      }
    },
    {
      link: {
        text: "Behaviour and discipline in schools: guide for governing bodies",
        path: "/government/publications/behaviour-and-discipline-in-schools-guidance-for-governing-bodies"
      },
      metadata: {
        public_updated_at: "2015-09-24 16:42:48 +0000",
        document_type: "Statutory guidance"
      }
    }
  ]
} %>