Skip to content

List group

te-list-group is a selectable list. Items can be plain strings or objects.

Basic

  • First
  • Second
  • Third
vue
<te-list-group :items="['First', 'Second', 'Third']" />

Objects, disabled items and flush

  • First
  • Second
  • Third
vue
<te-list-group flush :items="[
  { label: 'First' },
  { label: 'Second', disabled: true },
  { label: 'Third' },
]" />

Not clickable

  • First
  • Second
vue
<te-list-group :clickable="false" :items="['First', 'Second']" />

ListGroupItem

ts
interface ListGroupItem {
  label?: string;
  name?: string;      // slot name for this item
  disabled?: boolean;
}

Props

PropTypeDefaultDescription
items`(ListGroupItemstring)[]`— (required)
activeItemnumber | nullnullSelected index. Supports v-model:active-item.
clickablebooleantrueWhen false, clicking does not change the selection.
flushbooleanfalseRemoves the outer border.

Events

EventPayloadDescription
update:activeItemnumberEmitted when an item is clicked.

Slots

SlotPropsDescription
item-NContent of the Nth item. An item with a name uses that name instead.

Released under the MIT License.