Skip to content
All components

Components

Breadcrumb

A breadcrumb is a list of Crumb steps, each with its words and an optional address. Every step with an href is a link up; the last step is the current page, so give it no href (the web face never makes it a link). Use it on pages more than one level deep.

Two steps

Links up; the last step is the page.

[
    Crumb { text: "Service desk".into(), href: Some("#queue".into()) },
    Crumb { text: "Queue".into(), href: None },
][..]

Three steps

Each step above the page is a link.

[
    Crumb { text: "Components".into(), href: Some("/ui/components".into()) },
    Crumb { text: "Forms".into(), href: Some("#forms".into()) },
    Crumb { text: "Field".into(), href: None },
][..]

One step

At the top of an app the crumb is just the page.

[Crumb { text: "Dashboard".into(), href: None }][..]

On the Mac

The same vocabulary drawn by Ocean UI's native face (egui on Metal), as the gallery's snapshot.

Breadcrumb drawn by Ocean UI's native face, darkBreadcrumb drawn by Ocean UI's native face, light

Use it

Web

use ocean_ui_core::Crumb;
[Crumb { text: "Tickets".into(), href: Some("/tickets".into()) }, Crumb { text: "T-1042".into(), href: None }]

Native

use ocean_ui_native::{Show, core::Crumb, widgets::Breadcrumb};
let crumb = |text: &str, href: Option<&str>| Crumb { text: text.into(), href: href.map(Into::into) };
Breadcrumb(vec![crumb("Code", Some("/git/code")), crumb("main.rs", None)]).show(ui);

Cargo feature base of ocean-ui-core, ocean-ui-web and ocean-ui-native; available since 2026-10-29.

Props

NameTypeDefaultWhat
textString—The step's words, the page's short title.
hrefOption<String>NoneThe step's address; the current page has none.

Accessibility

  • The trail is a nav landmark named Breadcrumb holding an ordered list, so its length and order are announced.
  • The last step says aria-current="page" and is plain text, not a link.
  • A step before the last without an href is plain text too.

Related

Markdown

The same page as Markdown, for an agent or a pull request.

Search

esc

Components

Blocks

Screens built from blocks

The Ocean app

Ocean Base console