Skip to content

Tabs - AvTabs

✨ Introduction

The AvTabs automatically manages the addition of AvTab according to the AvTab present in the default slot.

The tab component allows users to navigate different content sections within the same page.

The tab system helps to group different contents together in a limited space, and allows dense content to be divided into individually accessible sections to make reading easier for the user.

🏗️ Structure

Each tab consists of the following elements:

  • an icon to the left of the title - optional.
  • a clickable title - mandatory: displays the associated content zone.

If the number of tabs exceeds the width of the container, a horizontal scroll allows you to navigate between the different tabs.

🏷️ Props

NameTypeDefaultMandatoryDescription
ariaLabelstringundefinedAria label of tab list.
modelValuenumberIndex of selected tab at loading (starts at 0).
compactstringundefinedAllows compact display: underline without central pipe.

🔊 Events

NameData (payload)Description
'update:modelValue'Index (number) of the selected tabIssued when a tab is selected.

🎨 Slots

NameDescription
defaultDefault slot for adding tabs (each tab must be in an AvTab).

🚀 Storybook demos

You can find examples of use and demo of the component on its dedicated Storybook page.

💡 Examples of use

vue
<template>
  <AvTabs v-model="activeTab">
    <AvTab
      title="My RPA list"
      icon="mdi:format-list-bulleted"
    >
      <AmsListContainer />
    </AvTab>
    <AvTab
      title="RPA Planning"
      icon="mdi:calendar-month-outline"
    >
      <AmsPlanningContainer />
    </AvTab>
  </AvTabs>
</template>