Skip to content
h v3.13.3
Search the docs
Find a component, section or page.

Breadcrumb

Displays the path to the current resource using a hierarchy of links.

Installation

pnpm add @heyramzi/ui

Usage

import * as Breadcrumb from "@heyramzi/ui/shadcn/breadcrumb";
<Breadcrumb.Root>
  <Breadcrumb.List>
    <Breadcrumb.Item>
      <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
    </Breadcrumb.Item>
    <Breadcrumb.Separator />
    <Breadcrumb.Item>
      <Breadcrumb.Link href="/components">Components</Breadcrumb.Link>
    </Breadcrumb.Item>
    <Breadcrumb.Separator />
    <Breadcrumb.Item>
      <Breadcrumb.Page>Breadcrumb</Breadcrumb.Page>
    </Breadcrumb.Item>
  </Breadcrumb.List>
</Breadcrumb.Root>

Keyboard and accessibility

  • It's a nav named "breadcrumb". The current page reports itself as the current page and isn't a link.
  • The separators are hidden from screen readers.
  • Breadcrumb.Ellipsis is hidden too. A trigger it sits in needs its own name, like the demo's "Toggle menu".

API reference

Breadcrumb.Root

ref bindable HTMLElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLElement> from svelte/elements
Prop Type Default
ref bindable HTMLElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLElement> from svelte/elements

Breadcrumb.List

ref bindable HTMLOlElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLOlAttributes from svelte/elements
Prop Type Default
ref bindable HTMLOlElement | null null
class string
children Snippet
...rest Every prop of HTMLOlAttributes from svelte/elements

Breadcrumb.Item

ref bindable HTMLLiElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLLiAttributes from svelte/elements
Prop Type Default
ref bindable HTMLLiElement | null null
class string
children Snippet
...rest Every prop of HTMLLiAttributes from svelte/elements
child Snippet<[{ props: HTMLAnchorAttributes }]>
ref bindable HTMLAnchorElement | null
Default null
class string
href string
Default undefined
children Snippet
...rest
Every prop of HTMLAnchorAttributes from svelte/elements
Prop Type Default
child Snippet<[{ props: HTMLAnchorAttributes }]>
ref bindable HTMLAnchorElement | null null
class string
href string undefined
children Snippet
...rest Every prop of HTMLAnchorAttributes from svelte/elements

Breadcrumb.Separator

ref bindable HTMLLiElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLLiAttributes from svelte/elements
Prop Type Default
ref bindable HTMLLiElement | null null
class string
children Snippet
...rest Every prop of HTMLLiAttributes from svelte/elements

Breadcrumb.Ellipsis

ref bindable HTMLSpanElement | null
Default null
class string
...rest
Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements except children
Prop Type Default
ref bindable HTMLSpanElement | null null
class string
...rest Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements except children

Breadcrumb.Page

ref bindable HTMLSpanElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements
Prop Type Default
ref bindable HTMLSpanElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements