Breadcrumb
Breadcrumb shows where the current page sits in your app's hierarchy. Use it on pages two or more levels deep. For top-level navigation, use NavigationMenu or Sidebar.
Installation
Run npx nxds-cli@latest init first if nxds isn’t set up in your app yet. See Install.
Usage
Composition
Examples
With ellipsis
Collapse the middle of a long trail into an ellipsis menu.
This example also needs: DropdownMenu.
With icons
Add icons to segments and a menu trigger for alternate paths.
This example also needs: DropdownMenu.
Props
Breadcrumb
Breadcrumb adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbEllipsis
BreadcrumbEllipsis adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbItem
BreadcrumbItem adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbLink
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | No default documented | Renders the child element instead, such as a router |
BreadcrumbList
BreadcrumbList adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbMenuTrigger
BreadcrumbMenuTrigger adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbPage
BreadcrumbPage adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbSeparator
BreadcrumbSeparator adds no props of its own; it accepts the props of the element or primitive it wraps.
Breadcrumb shows where the current page sits in your app's hierarchy. Use it on pages two or more levels deep. For top-level navigation, use NavigationMenu or Sidebar.
Installation
Install the following dependencies:
Copy and paste the following code into your project.
components/breadcrumb/Breadcrumb.vue components/breadcrumb/BreadcrumbEllipsis.vue components/breadcrumb/BreadcrumbItem.vue components/breadcrumb/BreadcrumbLink.vue components/breadcrumb/BreadcrumbList.vue components/breadcrumb/BreadcrumbMenuTrigger.vue components/breadcrumb/BreadcrumbPage.vue components/breadcrumb/BreadcrumbSeparator.vue components/breadcrumb/index.ts lib/icons.ts Keep each file at the path shown above it.
Paths are relative to
packages/vue/src/. Keep the same folders under your@/root, and the imports between files work without edits.
Usage
Examples
With ellipsis
Collapse the middle of a long trail into an ellipsis menu.
This example also needs: DropdownMenu.
With icons
Add icons to segments and a menu trigger for alternate paths.
This example also needs: DropdownMenu.
Props
Breadcrumb
Breadcrumb adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbEllipsis
BreadcrumbEllipsis adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbItem
BreadcrumbItem adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbLink
BreadcrumbLink adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbList
BreadcrumbList adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbMenuTrigger
BreadcrumbMenuTrigger adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbPage
BreadcrumbPage adds no props of its own; it accepts the props of the element or primitive it wraps.
BreadcrumbSeparator
BreadcrumbSeparator adds no props of its own; it accepts the props of the element or primitive it wraps.