BreadcrumbSwitcher
A breadcrumb trail whose segments are also switchers โ click one to ascend, open its arrow to move sideways.
Default
Each segment can carry a dropdown of siblings, so the trail is also the switcher.
Usage
import { BreadcrumbSwitcher } from '@oceanic-hub/brand-system'Give a segment options and it grows a dropdown of its siblings, rendered through
DropdownMenu โ so the trail that says where you are is also how you go somewhere else at the
same level. Segments navigate through href (a Slot, so the host supplies its own link) or
onSelect.
This is the control; Breadcrumb is the signpost with nothing to switch โ reach for that one
when a segment is only ever a place. Upstream's nearest thing is its own Dropdown example, one
BreadcrumbItem wrapped in a one-off menu; this component generalises that into every segment at
once, with a role ceiling and a tenant guard that one-off composition has no reason to need.
Exactly one parent chain, never two: a reseller's client renders Agency โบ Client โบ Project, a
direct one renders Oceanic โบ Client โบ Project with no reseller segment โ Oceanic takes the
root slot an agency would, it is not a fourth level. Super Admin is a platform role rather than a
level, so it never gets a segment of its own either.
A segment with neither href nor options renders as inert text, and that is the whole
mechanism for a role ceiling โ an Agency Owner who cannot ascend to Oceanic simply has a segment
that does nothing when clicked. There is no separate disabled look for it, so the boundary is a
behavioural fact rather than a visible one: nothing on the page marks it until someone tries.
The client avatar is not decoration โ it is the guard against acting on the wrong tenant, and
it is worth carrying at every depth once a client is in the chain, not only at the segment where
it was first set.
Its plate is square, because every segment of this chain is a scope somebody administers and
never a person โ the house rule Avatar's shape carries. It is not a prop here: a chain of
scopes is this component's entire subject, so there is nothing for a caller to decide. The
monogram's ink is not set at the call site either, and that is the fix rather than an omission โ
AvatarFallback declares the paired foreground for the brand plate, and it used to be deleted
on the way through cn, which is why these chips rendered dark initials on saturated blue.
The tenant avatar
Not decoration โ the guard against acting on the wrong tenant. Nothing carries it for you: set avatar on whichever segment names who you're acting on, and on every segment below it โ a deeper segment without one renders bare, and the guard goes quiet exactly where it matters most.
Platform scope
The root is "All agencies", not a level named Oceanic โ Super Admin is a platform role, so it never occupies a segment of its own.
Inside a shell that already owns its landmark
Four opt-ins for a host whose page is already a shell. landmark={false} renders the root as a plain div, so a page whose left rail is its ONE navigation landmark does not acquire a second one. popup="listbox" announces a segment as a list of PLACES rather than a list of commands โ the trigger's aria-haspopup, the container's role and every row's role move together. trailing puts a status mark at the end of an option row, where the fact about the thing belongs. footer puts the action that is not an option under a separator and outside the listbox, because a link nested among options is invalid ARIA. And groups cuts a lifecycle-ordered list into labelled sections.
API Reference
See the BreadcrumbSwitcher API page for every prop of every part, with types, defaults and the contract that pins them.