Serviceexample.go.id › services › passport › renew
Renew your passport online
Renew an adult passport that ends within the next 9 months.
English
A results page with the count, the sort, the facets, the results, and the pages
Builds the page that comes after a search. Your search service finds the hits, and this page shows them.
1–3 of 7 results for “passport”
<template>
<BlessSearchResults
v-model:selected="selected"
v-model:sort="sort"
v-model:page="page"
:query
:results="shown"
:total="hits.length"
:page-size
:facets
:sorts="[
{ value: 'best', label: 'Best match' },
{ value: 'new', label: 'Newest' },
]"
/>
</template>
<script setup lang="ts">
import { computed, ref, watch } from "vue";
import { BlessSearchResults, type BlessSearchHit } from "blessing-ui";
// a small index searched in the page; a real site asks its search service
const all: (BlessSearchHit & { year: number })[] = [
{
id: "1",
title: "Renew your passport online",
href: "https://example.go.id/services/passport/renew",
kind: "Service",
year: 2026,
snippet: "Renew an adult passport that ends within the next 9 months.",
},
{
id: "2",
title: "Passport fees for 2026",
href: "https://example.go.id/guides/passport-fees",
kind: "Guide",
year: 2026,
snippet: "The fee for a 48-page passport is Rp 350,000.",
},
{
id: "3",
title: "Lost or stolen passport",
href: "https://example.go.id/services/passport/lost",
kind: "Service",
year: 2025,
snippet: "Report a lost passport, then apply for a new one.",
},
{
id: "4",
title: "Passport photo rules",
href: "https://example.go.id/guides/passport-photo",
kind: "Guide",
year: 2025,
snippet: "Use a plain white background and a neutral face.",
},
{
id: "5",
title: "Passport for a child",
href: "https://example.go.id/services/passport/child",
kind: "Service",
year: 2026,
snippet: "Both parents must agree before a child gets a passport.",
},
{
id: "6",
title: "Passport office opening hours",
href: "https://example.go.id/offices/hours",
kind: "Page",
year: 2024,
snippet: "Most passport offices open from 08:00 to 15:00.",
},
{
id: "7",
title: "Travel letter instead of a passport",
href: "https://example.go.id/guides/travel-letter",
kind: "Guide",
year: 2024,
snippet: "A travel letter lets you go home if your passport is lost abroad.",
},
];
const query = "passport";
const selected = ref<Record<string, string[]>>({});
const sort = ref("best");
const page = ref(1);
const pageSize = 3;
const kinds = ["Service", "Guide", "Page"];
const facets = computed(() => [
{
id: "kind",
label: "Kind",
options: kinds.map((k) => ({
value: k,
label: k,
count: all.filter((r) => r.kind === k).length,
})),
},
]);
const hits = computed(() => {
const k = selected.value.kind ?? [];
const list = all.filter((r) => !k.length || k.includes(r.kind!));
return sort.value === "new" ? [...list].sort((a, b) => b.year - a.year) : list;
});
watch([selected, sort], () => (page.value = 1), { deep: true });
const shown = computed(() => hits.value.slice((page.value - 1) * pageSize, page.value * pageSize));
</script>query is the search. results is the hits of this page only, and total is the number of hits on all pages.facets adds a facet filter on the side, in v-model:selected. On a narrow screen, it goes on top.sorts adds a sort menu in v-model:sort. v-model:page and page-size drive the pagination.suggestion shows "Did you mean" with a button that emits suggest.locale formats the numbers. Change the words with labels or a label pack. The API table lists the keys.import { BlessSearchResults } from "blessing-ui";| Name | Type | Default | Description |
|---|---|---|---|
query* | string | — | |
results* | BlessSearchHit[] | — | the hits of this page only |
total* | number | — | the number of hits on all pages |
pageSize | number | 10 | |
facets | BlessFacet[] | [] | |
sorts | { value: string; label: string; }[] | [] | |
suggestion | string | — | a better spelling of the search, if your search engine has one |
locale | string | "en" | |
labels | Partial<{ count: (shown: string, total: string, query: string) => string; none: (query: string) => string; tips: string; sort: string; didYouMean: string; }> | — | |
selected | Record<string, string[]> | {} | |
sort | string | — | |
page | number | 1 |
| Name | Payload | Description |
|---|---|---|
update:selected | [value: Record<string, string[]>] | |
update:sort | [value: string | undefined] | |
update:page | [value: number] | |
suggest | [query: string] |