t×tecexpressby TeKOcloud
DEv0.7.1
Navigation & feedback / VUE

TxTabs.

Interactive preview

Tab navigation with optional content for the active tab.

PropTypeDefaultMeaning
dataSourceTxSource<string | Item> | undefinedundefinedList, configuration or DataSource instance; takes precedence over items.
items(string | Item)[] | undefined[]Entries; replaced by dataSource when bound.
selectedIndexnumber | undefinedundefinedZero-based active entry.
modelValuenumber | undefinedundefinedControlled v-model value.
disabledboolean | undefinedfalseDisables interaction.
labelstring | undefinedReiterLabel or accessible name.
orientationstring | undefinedhorizontalTab orientation.
scrollByContentboolean | undefinedtrueAllows scrolling through tab content.
swipeEnabledboolean | undefinedfalseAllows switching tabs by swiping.

Events

EventPayload / behavior
update:modelValueNew modelValue value; accept using v-model:modelValue (modelValue: v-model).
update:selectedIndexNew selectedIndex value; accept using v-model:selectedIndex (modelValue: v-model).
selectionChangedNew selection: { selectedIndex, itemData }.

Slots

SlotArguments
default{ selectedIndex, item }
vue
<script setup lang="ts">
import { TxTabs } from '@tekocloud.de/tecexpress'
import '@tekocloud.de/tecexpress/themes/index.css'

</script>

<template>
  <TxTabs :items="[{ text: 'Home' }, { text: 'Settings' }]">
    <template #default="{ selectedIndex }">Page {{ selectedIndex + 1 }}</template>
  </TxTabs>
</template>