A wider screen, please

This page features interactive demos and side-by-side code samples that need at least 340 pixels of horizontal space. Please widen your browser window, or rotate your device, to continue.

Morpheus v0.3.0
v0.3.0

Breadcrumb#

Component <neo-breadcrumb> is a horizontal trail of links ending in the current page. A ResizeObserver watches the host width and switches between the full trail, middle items collapsed into a popover, and just menu + last when even that doesn't fit.

DeactivateRenameDuplicate
Delete
New state Toggle autoplay
HTMLCSS

The selected state's markup and its scoped CSS. The CSS is wrapped in <style>@scope { ... }</style> and applies to the preview only. Edits change the preview above, applied live while Sync is on, or when you click Patch or Replace. Patch morphs the preview; Replace swaps it outright.

ReplacePatch

Signals

Datastar signals declared in the selected state's markup. Change a value to update the preview, applied live while Sync is on, or when you click Patch.

Patch

Reference#

Attributes #

NameTypeDefaultDescription
placement"bottom-start" | "bottom" | "bottom-end" | "top-start" | "top" | "top-end" | "left-start" | "left" | "left-end" | "right-start" | "right" | "right-end" observed"bottom-start"Forwarded to the overflow <neo-popover> when middle items collapse into a menu; see its placement values.
screen-offsetstring observednoneForwarded to the overflow <neo-popover>; controls the viewport edge margin and scrollable max size.
follow-scroll"always" | "until-trigger-invisible" observedunsetForwarded to the overflow <neo-popover>. When absent, close on outside scroll. Set to always to stay anchored during scroll. Set to until-trigger-invisible to close once the trigger leaves the viewport.
clamp-placementboolean observedfalseForwarded to the overflow <neo-popover>; re-anchor the menu so it stays inside the viewport when content would overflow.
min-fit-heightCSS length | "content" observed"content"Forwarded to the overflow <neo-popover>; minimum vertical slot before the menu auto-flips to the opposite side.
min-fit-widthCSS length | "content" observed"content"Forwarded to the overflow <neo-popover>; same as min-fit-height but for the horizontal axis.
min-open-heightCSS length observed2remForwarded to the overflow <neo-popover>; close when the bounded vertical slot is too small to be useful. Use 0 to disable.
min-open-widthCSS length observed2remForwarded to the overflow <neo-popover>; same as min-open-height but for horizontal space. Use 0 to disable.

Slots #

NameDescription
defaultAnchor or text items. Use data-neo-breadcrumb-sep on a child to render it as a custom separator.

Events #

NameDetailBubblesDescription
neo-breadcrumb-change{ shown: string[], hidden: string[] }yesFires when the trail adapts to its container, only on a real visible/collapsed change, not on every resize. shown and hidden are the ids of the items still in the trail vs. moved into the overflow menu; items without an id are omitted.

CSS variables #

NameDefaultDescription
--neo-breadcrumb-gapcalc(var(--page-spacing, 0.25rem) * 2)Gap between trail items and separators.
--neo-breadcrumb-colorvar(--muted, currentColor)Color of non-current links and separators.
--neo-breadcrumb-current-colorvar(--page-fg, currentColor)Color of the current page and hovered links.
--neo-breadcrumb-separator-size0.85emSeparator font size.

Examples#

Deep trail#

A deeper trail that exercises every render mode. The frame opens at a width that already forces the middle items into the ... menu, with the tail kept visible. Drag the frame wider to recover the full trail, or narrower to collapse to menu + last.

Home Catalog Electronics Computers Laptops Gaming UltraBook 12

Deep trail, compact labels#

The same stress case with compact single-letter crumbs. This keeps many more items visible before collapsing, which is useful for checking that the separator logic still behaves when labels are tiny.

A B C D E F G H I J K L

Slash separator#

Write whatever you like as the [data-neo-breadcrumb-sep] element between 2 items. Here a slash.

HomeWorkspaceSettingsAccount

Dot separator#

Same idea with a middle-dot character, which is softer and more typographic.

DocsReferenceComponentsBreadcrumb

Icon separator (sparkles)#

A separator can hold arbitrary markup, including other kit components, like a <neo-icon> with a non-default name.

HomeMusicPlaylistsLate Night

Chip wrappers#

Wrap each item in whatever markup you want; the wrapper just becomes the item. The current page can take its own treatment.

Docs Reference ComponentsBreadcrumb

Settings

Theme

DefaultSunshineOceanMatrixRose☀ ◐ ☾

Accessibility

Playgrounds

Server Simulator