v0.0.2
Demos (demo panel, opens in a new tab)

List group

Shows a bordered list with rows separated by lines; rows can be text, links, active or disabled.

zb:list-group zubazar/ui · free (MIT)

Basic usage

Basic usage: view
BLADE

zb:list-group is a list and each zb:list-group.item is a row; a row without href is plain text.

blade
<zb:list-group>
    <zb:list-group.item>Istanbul Main Warehouse</zb:list-group.item>
    <zb:list-group.item>Ankara Warehouse</zb:list-group.item>
    <zb:list-group.item>Izmir Warehouse</zb:list-group.item>
</zb:list-group>

Icon and badge

Icon and badge: view
BLADE

Put the icon at the start of the row and push the badge to the end with the ms-auto class.

blade
<zb:list-group>
    <zb:list-group.item href="#" active><zb:icon name="building-storefront" size="4" /> Istanbul Main Warehouse <zb:badge class="ms-auto">312</zb:badge></zb:list-group.item>
    <zb:list-group.item href="#"><zb:icon name="building-storefront" size="4" /> Ankara Warehouse <zb:badge class="ms-auto">148</zb:badge></zb:list-group.item>
    <zb:list-group.item href="#"><zb:icon name="building-storefront" size="4" /> Izmir Warehouse <zb:badge class="ms-auto">205</zb:badge></zb:list-group.item>
    <zb:list-group.item disabled><zb:icon name="building-storefront" size="4" /> Bursa Warehouse (inactive)</zb:list-group.item>
</zb:list-group>

Flush

Flush: view
BLADE

flush removes the outer border and background; inside a card, use it together with :padding="false".

blade
<zb:card title="Pending orders" :padding="false">
    <zb:list-group flush>
        <zb:list-group.item>Ayşe Yılmaz <zb:badge variant="warning" class="ms-auto">Awaiting payment</zb:badge></zb:list-group.item>
        <zb:list-group.item>Mehmet Kaya <zb:badge variant="warning" class="ms-auto">Awaiting payment</zb:badge></zb:list-group.item>
        <zb:list-group.item>Zeynep Arslan <zb:badge class="ms-auto">Preparing</zb:badge></zb:list-group.item>
    </zb:list-group>
</zb:card>
PropValues
flushtrue | false

Props

The values the component takes. What are props and slots?

PropTypeDefaultDescription
flushbooleanfalseWithout the outer border and background
list-group.item: href—nullMakes the row a link
list-group.item: activebooleanfalseSelected row; aria-current is added to the link
list-group.item: disabledbooleanfalseFaded row; no link is produced
Zubazar UI · ZubazarDesigned for people.