Skip to content

MTabs <m-tabs> ​

Tabs. The raised tab slides to the one you pick, stretching, and lands with wedges and a puff. Follows the WAI-ARIA tabs pattern: arrow keys, Home and End move and select. The default slot is the panel.

Demo source
vue
<script setup lang="ts">
import { ref } from 'vue';
import { MTabs } from 'vue-manga-ui';

const tab = ref(0);
</script>

<template>
  <MTabs v-slot="{ tab: name }" v-model="tab" :tabs="['Home', 'Profile', 'Settings']" label="Sections">
    <p>{{ name }} panel</p>
  </MTabs>
</template>

Props ​

PropTypeDefaultDescription
tabs *string[]—Tab labels.
labelstring""Accessible name of the tab list.
modelValuenumber0Index of the selected tab.

Other HTML attributes (id, class, aria-*, data-*…) fall through to the component’s element and are type-checked.

Events ​

EventPayloadDescription
update:modelValue[value: number]v-model update.

Slots ​

SlotPropsDescription
default{ index: number; tab: string; }The panel for the selected tab.