list_group() html()
A list group: lines with badges, states and colours.
html()->list_group($data = [], $extra = [])Options
| Option | Meaning |
|---|---|
$data | Items: a string, or ['body' (HTML), 'badge', 'class_item', 'link', 'active', 'disabled', 'variant']. |
numbered, flush, theme, variant | Bootstrap 4 / 5 options. |
Example
- First line
- 14 Cras justo odio
- 2 Dapibus ac facilisis in
- 1 Morbi leo risus
Code
return html()->list_group([
'First line',
['body' => 'Cras justo odio', 'badge' => '14'],
['body' => 'Dapibus ac facilisis in', 'badge' => '2', 'class_item' => 'active'],
['body' => 'Morbi leo risus', 'badge' => '1', 'class_item' => 'list-group-item-warning'],
]);Notes
- Per-item
link,active,disabled,variantneedB5_ITEM_OPTIONS.
Bootstrap 3 and 5
Bootstrap 3 list group; Bootstrap 5 with numbered / flush.
See also: html/li, html/navlist