BaseTabs

Sections of one page, one visible at a time.

Import it from rei-kit/web: import { BaseTabs } from 'rei-kit/web'

Open BaseTabs in the live documentation, where every prop below is a control you can change, in four materials and ten palettes.

Usage

<script setup lang="ts">
import { ref } from 'vue'
import { BaseTabs } from 'rei-kit/web'

const tab = ref('week')
const tabs = [
  { key: 'week', label: 'Week' },
  { key: 'month', label: 'Month' },
]
</script>

<template>
  <BaseTabs v-model="tab" :items="tabs" label="Report">
    <template #default="{ active }">
      <p v-if="active === 'week'">This week…</p>
      <p v-else>This month…</p>
    </template>
  </BaseTabs>
</template>

Props

Props
PropTypeRequired or defaultWhat it is for
itemsreadonly TabPanel<K>[]yes
labelstring''Accessible name for the tablist.

About rei-kit

rei-kit is an accessible Vue 3 and Tailwind CSS 4 component library: 106 components, themed by role rather than by colour on three independent axes — ten WCAG-checked palettes, four materials and light or dark, each switched with one attribute. Typed, tested, SSR-safe, no runtime dependencies, MIT.

pnpm add rei-kit · npm · GitHub