Skip to content

components/window

@fungi.computer/caps


@fungi.computer/caps / components/window

WindowFrameProps = HTMLAttributes<HTMLElement> > & object

Window presentation only. The host owns geometry, focus order and lifecycle.

optional active?: boolean

optional floating?: boolean


WindowHeaderProps = Omit<HTMLAttributes<HTMLElement>>, "title" | "children"> > & object

Supply handleProps only when the title is an interactive layout handle.

title: string

optional icon?: ReactNode

optional actions?: ReactNode

optional handleProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>>, "children" | "type">>


WindowActionsProps = object

Available callbacks determine available controls; no inert placeholder actions.

title: string

optional floating?: boolean

optional maximized?: boolean

optional onPromote?: () => void

Request making this window the main tiled window.

void

optional onToggleFloating?: () => void

Request switching between floating and tiled placement.

void

optional onToggleMaximize?: () => void

Request toggling maximized presentation.

void

optional onMinimize?: () => void

Request minimizing; the caller owns window visibility.

void

optional onClose?: () => void

Request closing; the caller owns disposal and removal.

void

const WindowFrame: ForwardRefExoticComponent<HTMLAttributes<HTMLElement> > & object & RefAttributes<HTMLElement>>>>

A clipped, rounded shell for either a tiled or floating application.


const WindowBody: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> > & RefAttributes<HTMLDivElement>>>>

The scrolling region stays inside the shell, beneath a stationary title bar.

WindowSnapPreview(__namedParameters): Element

Decorative snap destination. Geometry and visibility belong to the layout owner.

HTMLAttributes<HTMLDivElement>

Element


WindowHeader(__namedParameters): Element

The handle and actions are siblings, so action presses never start a drag.

WindowHeaderProps

Element


WindowActions(__namedParameters): Element

Consistent icons, ordering and accessible names for host-owned commands.

WindowActionsProps

Element