Table example
With head and caption
How it looks (preview)
Month you apply | Rate for bicycles | Rate for vehicles |
---|---|---|
January | £85 | £95 |
February | £75 | £55 |
March | £165 | £125 |
How to call this example
<%= render "govuk_publishing_components/components/table", {
caption: "Caption 1: Months and rates",
caption_classes: "govuk-heading-m",
first_cell_is_header: true,
head: [
{
text: "Month you apply"
},
{
text: "Rate for bicycles",
format: "numeric"
},
{
text: "Rate for vehicles",
format: "numeric"
}
],
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"
}
]
]
} %>