Skip to main content
RequestDisplayMode asks the host to change how the app is displayed — switching between inline, fullscreen, or picture-in-picture. The host decides whether to honor the request, so the actual mode may differ from what you asked for.

Display Mode Toggle

Use the HOST reactive variable to show the right button based on the current display mode. The host context is automatically available as $host in the renderer’s state:

API Reference

RequestDisplayMode Parameters

"inline" | "fullscreen" | "pip"
required
The display mode to request. Can be passed as a positional argument. The host may not support every mode.
Action | list[Action] | None
default:"None"
Action(s) to run when the host grants the requested mode.
Action | list[Action] | None
default:"None"
Action(s) to run when the host rejects or cannot honor the request.

Protocol Reference

RequestDisplayMode
For the complete protocol schema, see RequestDisplayMode.