API reference
components/window-crumbs
Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | WindowCrumb | One place in the content’s path; siblings makes it a switcher. |
| type alias | WindowCommand | A command the content offers in the header; the content owns its effect. |
| type alias | WindowStatus | A quiet fact about the view: muted text led by the Caps status bead. |
| function | WindowCrumbs() | The path as a trail; on a phone only ‹ parent › current remain. |
| function | WindowCommands() | Primary commands as buttons, the rest behind a ⋯ menu. |
| function | WindowStatuses() | Settled beads reveal their labels on hover/focus; other state stays visible. |
WindowCrumbtype alias
Section titled “WindowCrumb”type WindowCrumb = object;One place in the content’s path; siblings makes it a switcher.
Properties
Section titled “Properties”id: string;label: string;siblings?
Section titled “siblings?”optional siblings?: readonly object[];Other places at this level, offered by a ▾ switcher on the crumb.
WindowCommandtype alias
Section titled “WindowCommand”type WindowCommand = object;A command the content offers in the header; the content owns its effect.
Properties
Section titled “Properties”id: string;label: string;optional icon?: "play";Render a supported glyph alone; label remains the accessible name.
variant?
Section titled “variant?”optional variant?: "primary" | "outline" | "ghost";Which Caps button a primary command wears; default outline.
optional tone?: "destructive";A menu item that removes or discards something.
disabled?
Section titled “disabled?”optional disabled?: boolean;WindowStatustype alias
Section titled “WindowStatus”type WindowStatus = object;A quiet fact about the view: muted text led by the Caps status bead.
Properties
Section titled “Properties”id: string;label: string;presentation?
Section titled “presentation?”optional presentation?: "bead";Hide only the visible label, retaining it for assistive technology.
optional tone?: Extract<StatusTone, "neutral" | "info" | "warning" | "success" | "error">;WindowCrumbs()function
Section titled “WindowCrumbs()”function WindowCrumbs(__namedParameters): Element;The path as a trail; on a phone only ‹ parent › current remain.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
{ crumbs: readonly WindowCrumb[]; popover?: HTMLElement | null; onCrumb?: (crumbId, siblingId?) => void; } |
__namedParameters.crumbs |
readonly WindowCrumb[] |
__namedParameters.popover? |
HTMLElement | null |
__namedParameters.onCrumb? |
(crumbId, siblingId?) => void |
Returns
Section titled “Returns”Element
WindowCommands()function
Section titled “WindowCommands()”function WindowCommands(__namedParameters): Element | null;Primary commands as buttons, the rest behind a ⋯ menu.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
{ primary?: readonly WindowCommand[]; menu?: readonly WindowCommand[]; popover?: HTMLElement | null; onAction?: (id) => void; } |
__namedParameters.primary? |
readonly WindowCommand[] |
__namedParameters.menu? |
readonly WindowCommand[] |
__namedParameters.popover? |
HTMLElement | null |
__namedParameters.onAction? |
(id) => void |
Returns
Section titled “Returns”Element | null
WindowStatuses()function
Section titled “WindowStatuses()”function WindowStatuses(__namedParameters): Element | null;Settled beads reveal their labels on hover/focus; other state stays visible.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
{ status: readonly WindowStatus[]; } |
__namedParameters.status |
readonly WindowStatus[] |
Returns
Section titled “Returns”Element | null