Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 691 Bytes

File metadata and controls

26 lines (19 loc) · 691 Bytes

useDisplayMode

Hook for programmatic display mode access. Must be inside <AppLayout>.

import { useDisplayMode } from "open-mcp-app-ui";

Returns

Property Type Description
displayMode DisplayMode Current display mode.
isInline boolean True when mode is "inline".
isPip boolean True when mode is "pip".
isFullscreen boolean True when mode is "fullscreen".
availableDisplayModes DisplayMode[] Modes the host supports.

Example

const { displayMode, isInline, isPip, isFullscreen } = useDisplayMode();

if (isInline) return <CompactView />;
return <FullView />;