Skip to content
API reference

blocks/app-bar

Import
import * as api from "@fungi.computer/caps/blocks/app-bar";
Kind Export Description
type alias AppBarItem A caller-owned running App window or available App launcher.
type alias AppBarProps Caller-owned apps and actions; AppBar owns only presentation and disclosure.
function AppBar() An anchored launcher between persistent running apps and a spring-out app tray.

AppBarItemtype alias

Section titled “AppBarItem”
Signature
type AppBarItem = object;

A caller-owned running App window or available App launcher.

Signature
id: string;
Signature
label: string;
Signature
optional icon?: ReactNode;
Signature
optional active?: boolean;
Signature
onSelect: () => void;

Request focusing a running window or opening an available App.

void

Signature
optional onClose?: () => void;

Request closing; the caller owns disposal and removal.

void


AppBarPropstype alias

Section titled “AppBarProps”
Signature
type AppBarProps = object;

Caller-owned apps and actions; AppBar owns only presentation and disclosure.

Signature
optional container?: HTMLElement | null;

Portal container for the App dial; defaults to the document body.

Signature
windows: readonly AppBarItem[];
Signature
launchers: readonly AppBarItem[];

Team Apps available to launch from the speed dial.

Signature
optional sessions?: readonly AppBarItem[];

Recent Sessions supplied by the shell’s session owner.

Signature
optional launcherLabels?: "truncate" | "wrap";

Keep long launcher names readable instead of truncating them.

Signature
optional alwaysExpanded?: boolean;
Signature
optional isOpen?: boolean;

Control the compact App dial from the surrounding shell.

Signature
optional onOpenChange?: (open) => void;

Report requests to open or dismiss the compact App dial.

Parameter Type
open boolean

void

Signature
optional emptyLabel?: ReactNode;
Signature
launcher: object;
Signature
label: string;
Signature
optional icon?: ReactNode;
Signature
optional primaryAction?: object;

A primary action revealed above the launcher, such as starting a chat.

Signature
label: string;
Signature
icon: ReactNode;
Signature
onSelect: () => void;

Invoke the caller-owned primary action.

void

Signature
function AppBar(__namedParameters): Element;

An anchored launcher between persistent running apps and a spring-out app tray.

Parameter Type
__namedParameters AppBarProps

Element