AI-Powered Search for Vue and Nuxt Applications
Add AI-powered search to Vue/Nuxt apps in minutes. Reactive composables, pre-built components, full TypeScript support.
The Vue ecosystem lacks a cohesive search solution. You\'re forced to choose between abandoned libraries, vendor lock-in, or building everything yourself.
The Vue ecosystem lacks a first-party search solution. You're left stitching together community libraries or building from scratch.
The official Vue InstantSearch library is deprecated and barely maintained. Limited to Algolia's ecosystem with no standalone option.
Manual API integration with Meilisearch requires writing your own reactive composables, state management, and error handling.
Reactive composables with Nuxt 3 SSR support, TypeScript inference, and pre-built components.
useSearch, useHits, useFacets composables with full Vue 3 reactivity. Automatic state updates when query changes.
SSR search with useAsyncData compatibility. Pre-fetch results server-side for SEO-critical pages.
SearchBox, Hits, FacetFilter, Pagination components ready to drop in. Customize with slots and props.
Full type inference in templates with Volar. Autocomplete for composables, component props, and hit objects.
Works with your state management. Use SearchJet composables inside Pinia stores or Vuex modules.
Works with @nuxtjs/i18n and vue-i18n out of the box. Multi-language search UI with locale-aware faceting.
Two approaches — Nuxt 3 page or reusable composable
// pages/search.vue
<script setup>
import { useSearch, useHits } from '@searchjet/vue';
const { query, isSearching } = useSearch({
indexName: 'your_index',
searchApiKey: 'your_search_api_key',
});
const { hits } = useHits();
</script>
<template>
<div class="max-w-4xl mx-auto py-12 px-6">
<input
v-model="query"
type="text"
placeholder="Search docs..."
class="w-full p-4 border-2 border-gray-200 rounded-xl text-lg focus:border-blue-500 focus:outline-none"
/>
<div v-if="isSearching" class="mt-8 text-center text-gray-500">
Searching...
</div>
<div v-else class="mt-8 space-y-4">
<article
v-for="hit in hits"
:key="hit.objectID"
class="p-6 border border-gray-200 rounded-xl hover:border-blue-300"
>
<h3 class="text-xl font-semibold" v-html="hit._highlightResult?.title?.value || hit.title" />
<p class="mt-2 text-gray-600" v-html="hit._highlightResult?.content?.value || hit.content" />
</article>
</div>
</div>
</template>// composables/useProductSearch.ts
import { ref, computed } from 'vue';
import { useSearch, useHits, useFacets } from '@searchjet/vue';
export function useProductSearch() {
const filters = ref({ category: '', priceRange: '' });
const { query, setQuery, isSearching } = useSearch({
indexName: 'products',
searchApiKey: 'your_search_api_key',
filters: computed(() => buildFilterString(filters.value)),
});
const { hits, totalHits } = useHits();
const { facets } = useFacets();
const filteredProducts = computed(() =>
hits.value.map(hit => ({
...hit,
formattedPrice: new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
}).format(hit.price),
}))
);
function applyFilter(facet, value) {
filters.value = { ...filters.value, [facet]: value };
}
return {
query, setQuery, isSearching,
filteredProducts, totalHits,
facets, filters, applyFilter,
};
}Need a complete starter project?
View GitHub ExamplesEverything you need to know about SearchJet for Vue/Nuxt
Still have questions?
Contact our support teamJoin developers building exceptional search experiences with SearchJet
Already have an account? Log in
Explore more