Spread Routes

A [...operator] catch-all route of any depth. Each label comes from the last segment of its own path.

Try these routes

Multi-route breadcrumb from a single page

The { routes } form defines a resolver per route pattern from one file. Each resolver receives the breadcrumb's own URL as its second argument — the crumb at /spread/users/42 gets that exact path, not the full page.params. Use it when depth isn't known ahead of time: file browsers, nested categories, operator trees.

<script module lang="ts">
	export const breadcrumb: BreadcrumbMeta = {
	  routes: {
	    '/spread': async () => ({ label: 'Spread' }),
	    '/spread/[...operator]': async (_page, url) => {
	      // url is the breadcrumb's own path, e.g. "/spread/users/42"
	      const lastSegment = url.split('/').pop() ?? 'overview';
	      return { label: lastSegment };
	    }
	  }
	};
</script>