Breadcrumb
Links back to the parent pages of the current page, separated by chevrons or your own separator.
Installation
Copy the command below and run it in your terminal.
Usage
Each Item renders a link. The Item whose href matches the current path, read from SvelteKit's $app/state, gets the current-page style.
An empty Separator renders a chevron.
Examples
With home icon
Anatomy
Breadcrumb.Root - Lays out items and separators in a row.
Breadcrumb.Item - Renders a link, styled as current when it matches the path.
Breadcrumb.Separator - Renders a chevron, or your own separator content.
<script lang="ts"> import ChevronRight from '@lucide/svelte/icons/chevron-right'; import * as Breadcrumb from '@sivir-ui/svelte/components/breadcrumb'; </script> <div class="flex items-center justify-center"> <Breadcrumb.Root> <Breadcrumb.Item href="/">Home</Breadcrumb.Item> <Breadcrumb.Separator><ChevronRight size={14} /></Breadcrumb.Separator> <Breadcrumb.Item href="/docs">Docs</Breadcrumb.Item> <Breadcrumb.Separator><ChevronRight size={14} /></Breadcrumb.Separator> <Breadcrumb.Item href="/docs/components/breadcrumb">Breadcrumb</Breadcrumb.Item> </Breadcrumb.Root> </div>