List
Pass an array of items and have them rendered as a simple unordered or ordered list, this is particularly useful when chained with other helpers.
Lists are purposely left unstyled, but you can use block lists if you need nicer styling.
Example usage
{{
html.list({
'items': [
'foo',
'bar'
]
})
}}
See the Pen docs - html - list by Pulsar (@pulsar) on CodePen.
Options
Option | Type | Description |
---|---|---|
active_item | int | The index of the active item, will have the .is-active class applied |
class | string | CSS classes, space separated |
id | string | A unique identifier, if required |
items | array | An array of items to be rendered as a list |
type | string | ul (default), ol |
data-* | string | Data attributes, eg: 'data-foo': 'bar' |
Block list
Add prettier styling around your lists with the .block-list
variations. See the block list page for more information.
See the Pen docs - html - block list regular by Pulsar (@pulsar) on CodePen.