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
| Prop | Type | Default | Description |
|---|---|---|---|
tabs * | string[] | — | Tab labels. |
label | string | "" | Accessible name of the tab list. |
modelValue | number | 0 | Index of the selected tab. |
Other HTML attributes (id, class, aria-*, data-*…) fall through to the component’s element and are type-checked.
Events
| Event | Payload | Description |
|---|---|---|
update:modelValue | [value: number] | v-model update. |
Slots
| Slot | Props | Description |
|---|---|---|
default | { index: number; tab: string; } | The panel for the selected tab. |