1. Collections Component Guide
  2. Table
  3. Default
Table example

Default

How it looks (preview)

January £85 £95
February £75 £55
March £165 £125

How to call this example

<%= render "govuk_publishing_components/components/table", {
  rows: [
    [
      {
        text: "January"
      },
      {
        text: "£85",
        format: "numeric"
      },
      {
        text: "£95",
        format: "numeric"
      }
    ],
    [
      {
        text: "February"
      },
      {
        text: "£75",
        format: "numeric"
      },
      {
        text: "£55",
        format: "numeric"
      }
    ],
    [
      {
        text: "March"
      },
      {
        text: "£165",
        format: "numeric"
      },
      {
        text: "£125",
        format: "numeric"
      }
    ]
  ]
} %>