Composables
useVibes
Standardized vibe ids for the "Good For" / Atmosphere / Noise Level filter — three groups, twelve total options.
useVibes
Standardized set of vibe ids used for the multi-dimensional vibe filter (Good For / Atmosphere / Noise). All vibe values stored on a restaurant's vibes: string[] field should use one of these ids.
Vibe ids
Good For (good-for-*)
| id | Label | Icon |
|---|---|---|
good-for-date-night | Date Night | i-heroicons-heart-20-solid |
good-for-family | Family | i-heroicons-user-group-20-solid |
good-for-business | Business | i-heroicons-briefcase-20-solid |
good-for-groups | Groups | i-heroicons-users-20-solid |
good-for-kids | Kids | i-heroicons-face-smile-20-solid |
Atmosphere
| id | Label | Icon |
|---|---|---|
casual | Casual | i-heroicons-sun-20-solid |
trendy | Trendy | i-heroicons-sparkles-20-solid |
intimate | Intimate | i-heroicons-fire-20-solid |
upscale | Upscale | i-heroicons-star-20-solid |
Noise Level
| id | Label | Icon |
|---|---|---|
quiet | Quiet | i-heroicons-speaker-x-mark-20-solid |
moderate | Moderate Noise | i-heroicons-speaker-wave-20-solid |
loud | Lively | i-heroicons-musical-note-20-solid |
Usage
<script setup>
const { getLabel, getIcon, byGroup, vibes } = useVibes()
const label = getLabel('good-for-date-night') // → 'Date Night'
const icon = getIcon('casual') // → 'i-heroicons-sun-20-solid'
const goodForOptions = byGroup('good-for') // → array of 5 vibes
</script>
<template>
<UBadge
v-for="vibeId in restaurant.vibes"
:key="vibeId"
:icon="getIcon(vibeId)"
>
{{ getLabel(vibeId) }}
</UBadge>
</template>
Adding new vibes
To add a new vibe, append a VibeMeta entry to the VIBES array in app/composables/useVibes.ts. The id must be unique; the group must be one of 'good-for' | 'atmosphere' | 'noise'.
AI Context
composable: useVibes
package: "@xenterprises/nuxt-x-restaurants"
use-when: >
Adding or displaying vibe filters on restaurants (Date Night / Family /
Casual / Trendy / Quiet / etc.). Provides 12 standardized ids across
three groups. Restaurants store vibes as string[] in the vibes or
ambiance field; the filter checks both. Used by the VibeFilter
component and the useRestaurantFilters composable.
