Skip to main content
sunpeak API

Overview

The useDisplayMode hook returns the current display mode of the app. It is a convenience wrapper around useHostContext.

Wraps onhostcontextchanged

MCP Apps SDK reference

Import

Signature

The return type is McpUiDisplayMode.

Returns

return
'inline' | 'pip' | 'fullscreen'
The current display mode. Defaults to 'inline' when unavailable.

Usage