214 Sea View Double with Balcony and Freestanding Bath
Sleeps 2 · £148 tonight
trailpresentationhideCurrentfloatingwidthdisabledimport { Breadcrumb } from "@/components/ui/breadcrumb"
const trail = [
{ label: "Saltmarsh Hotels", href: "/hotels" },
{ label: "Properties", href: "/properties" },
{ label: "Harbour House", href: "/harbour-house" },
{ label: "Second floor", href: "/second-floor" },
{ label: "Rooms", href: "/rooms" },
{ label: "214 Sea View Double with Balcony and Freestanding Bath" },
]
export function RoomPath() {
return (
<Breadcrumb
items={trail}
/>
)
}Usage
import { Breadcrumb } from "@/components/ui/breadcrumb"
export function RoomPath() {
return (
<Breadcrumb
items={[
{ label: "Properties", href: "/properties" },
{ label: "Harbour House", href: "/properties/harbour-house" },
{ label: "Rooms", href: "/properties/harbour-house/rooms" },
{ label: "214 Sea View Double" },
]}
/>
)
}Examples
November 2026
£48,210.00 across 31 transfers
import { Breadcrumb } from '@/components/ui/breadcrumb';
export function PayoutHead() {
return (
<div>
<Breadcrumb
hideCurrent
items={[
{ label: 'Saltmarsh Hotels', href: '/' },
{ label: 'Payouts', href: '/payouts' },
{ label: 'November 2026' },
]}
/>
<h3 className="mt-3.5 text-[22px] font-semibold">November 2026</h3>
<p className="text-[13px] text-muted-foreground">£48,210.00 across 31 transfers</p>
</div>
);
}Drag the corner to narrow or widen the box.
import { Breadcrumb } from '@/components/ui/breadcrumb';
const trail = [
{ label: 'Saltmarsh Hotels', href: '/' },
{ label: 'Properties', href: '/properties' },
{ label: 'Harbour House', href: '/properties/harbour-house' },
{ label: 'Second floor', href: '/properties/harbour-house/floors/2' },
{ label: 'Rooms', href: '/properties/harbour-house/floors/2/rooms' },
{ label: '214 Sea View Double with Balcony and Freestanding Bath' },
];
export function RoomPath() {
return (
<div className="w-[420px] min-w-[180px] max-w-full resize-x overflow-hidden">
<Breadcrumb items={trail} />
</div>
);
}import { Breadcrumb } from '@/components/ui/breadcrumb';
export function RoomHero({ trail }: { trail: { label: string; href?: string }[] }) {
return (
<div className="relative h-[300px]">
<img src="/rooms/214.jpg" alt="" className="size-full object-cover" />
<Breadcrumb items={trail} presentation="back" floating className="absolute inset-x-3 top-3" />
</div>
);
}import NextLink from 'next/link';
import { Breadcrumb } from '@/components/ui/breadcrumb';
export function DocsPath() {
return (
<Breadcrumb
items={[
{ label: 'Docs', href: '/docs', render: <NextLink href="/docs" /> },
{ label: 'Components', href: '/docs/components', render: <NextLink href="/docs/components" /> },
{ label: 'Breadcrumb' },
]}
/>
);
}Notes
Folding
The trail is measured, not breakpoint-driven. As the container narrows, middle levels fold into one … menu, one at a time and only as far as needed. A level that is kept is never cut short. The root and the parent always stay. Levels before the last are capped in width; the last truncates, with its full name in a tooltip. With auto, a container too narrow for even those to read turns the trail into the back link.
breadcrumbFit() is the measurement as a function, for a trail of your own. Pass readable and it returns 0 when even the fewest levels would truncate below that width.
Current page
The last item is the current page: plain text with aria-current="page", never a link. When the heading below already names it, hideCurrent drops it and the parent ends the trail.
Phone
Below 768px the breadcrumb is one back link to the parent. The path button, or holding the back link, opens the whole trail in a sheet, root first so the nearest levels sit lowest, by the thumb. Long names wrap there rather than truncate. Over a photo, floating frosts both buttons; place the nav over the image yourself.
Routers
Give an item render, such as <NextLink href="/rooms" />, and every place that level appears, the trail, the menu and the sheet, uses your router's link.
Or move in onNavigate: call your router and details.event.preventDefault(). That stops the browser's own link, for people and agents alike, and an agent's goTo still counts as done. details.cancel() is for refusing a move, and tells an agent so.
Motion
None of its own: a breadcrumb is used many times a day. Hover changes colour only, and folding is instant. The … menu and the phone sheet keep Menu's and Drawer's own motion.
API
{ label, href?, render? }. The last is the current page.back is one link to the parent with the trail in a sheet. auto is back below 768px, and in any container too narrow to read the trail.back as frosted pills that read over a photo.details.reason is link-press, menu-press, back-press, sheet-press or, for an agent, imperative-action. details.cancel() refuses the move. details.event.preventDefault() only stops the link, for a move your router makes.Agent
Inside an AgentProvider, it appears in agent.snapshot() as list.
Reads
labelThe aria-label, "Breadcrumb" by default.
valueThe current page.
itemsEvery level, root first, folded ones included.
Actions
goTo("Rooms")Goes to a level by name, or by position from 1. A folded level is reached through its menu, or the sheet on phones.
An agent's move runs through onNavigate like anyone's. Its reason is imperative-action, and details.event is the real click, as for a person, so tell an agent's move apart with isAgentChange(details). details.cancel() refuses it. An app that routes the move itself calls details.event.preventDefault() instead, and the step succeeds. A level that is not in the trail is refused with the list, and a level without an href cannot be gone to.
await agent.act({
steps: [{ ref: "Breadcrumb", action: "goTo", args: ["Harbour House"] }],
})Accessibility
- A
<nav>landmark named "Breadcrumb" unless you name it, holding an ordered list. - The current page has
aria-current="page"and is not a link. - Separators are hidden from assistive tech.
- The
…button is named for what it holds, such as Show 3 more levels. - On phones the back link reads Back to Rooms, and the path button Show full path, so the trail never needs a long-press.
- On phones the back link, the path button and the folded levels are 44px targets.
Keyboard
… button… button