List
Use this helper to generate different types of lists.
Plain lists
You can create a plain list with no bullets or numbers by passing an array of items to the govuk_list
helper.
Bulleted lists
To make a list bulleted, add type: :bullet
Numbered lists
To make a list numbered, add type: :number
. This will also change the HTML to use an ordered list tag (<ol>
).
Adding extra spacing between list items
If a list is hard to read because the items run across multiple lines you can add extra spacing by adding spaced: true
.
You can also pass the list content to the helper as a block. This can make your code easier to read, but you will need to include your own <li>
tags.