Skip to content

Tabs

Accessible tabs with keyboard navigation and named panel slots.

Usage

vue
<script setup>
import { ref } from "vue";
import { ArchTabs } from "@archora/ui";

const tab = ref("overview");
const items = [
  { value: "overview", label: "Overview" },
  { value: "events", label: "Events" }
];
</script>

<template>
  <ArchTabs v-model="tab" :items="items">
    <template #overview>Overview content</template>
    <template #events>Events content</template>
  </ArchTabs>
</template>

Live sandbox

Tabs can be tested directly on this page.

interactive
Overview panel
<Tabs />

Props

PropTypeDefaultDescription
items{ value: string; label: string; disabled?: boolean }[]-Item collection.
modelValuestring-v-model value.
ariaLabelstring"Tabs"aria-label.

Events

EventPayloadDescription
update:modelValuevalue: stringmodelValue change.
changevalue: stringValue change.

Slots

SlotPropsDescription
-Named slot for the panel matching the value.
default{ item?: { value: string; label: string; disabled?: boolean } }Fallback panel.