Components
<AisMenu>
Menu Widget
Usage
MySearchExperience.vue
<template>
<div>
<AisInstantSearch :widgets :configuration>
<AisMenu attribute="categories" :show-more="true" />
</AisInstantSearch>
</div>
</template>
<script setup lang="ts">
const widgets = computed(() => [
useAisMenu({
attribute: "categories",
limit: 5,
showMore: true,
showMoreLimit: 10,
sortBy: ["name:asc"],
transformItems: (items) => {
return items.map((item) => {
return {
...item,
label: item.label.toUpperCase(),
};
});
},
}),
]);
</script>
Slots, props and widget connector params are all typed! More thorough documentation coming soon :)