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;
}

Keyboard ​

Only when clickable — a static list is not interactive and stays out of the tab order. The list is one tab stop; the arrows move inside it, and disabled rows are skipped. Moving the focus does not change the selection, so the active item only changes when you ask for it.

KeyDoes
↑ ↓Previous / next row.
Home EndFirst / last row.
Enter SpaceSelect the focused row.

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-N—Content of the Nth item. An item with a name uses that name instead.