Skip to content

SearchTabs Component ​

File Information ​

  • Path: app/components/search/SearchTabs.vue
  • Purpose: Assets / Collages / Folders tab strip for search results, with an optional All tab.
  • Type: Search Component

Overview ​

A thin v-model wrapper around Vuetify v-tabs (inset). Each tab maps to one Typesense collection through SEARCH_TAB_COLLECTION in useSearchUtils; the component itself only emits the selected key.

KeyLabelShown
allAllonly when includeAll is true (first position)
assetsAssetsalways
collagesCollagesalways
foldersFoldersalways

Props ​

PropTypeDefaultDescription
modelValueSearchTab | 'all'-Active tab key
includeAllbooleanfalsePrepends the All tab

SearchTabValue (SearchTab | 'all') is exported from the component for callers.

Events ​

EventPayloadWhen
update:modelValueSearchTabValueuser selects a tab

Usage Example ​

vue
<!-- SearchBar.vue: dropdown preview, includes All -->
<SearchTabs v-model="activeTab" include-all />

<!-- pages/[brand_name]/search.vue: results page, no All tab -->
<SearchTabs :model-value="activeTab" @update:model-value="setTab($event as SearchTab)" />