import { useMaxHeight } from "moonpeak";
useMaxHeight(): number | undefinedThe tallest the View may grow (maxHeight, or height when the host sets a fixed size).
Example
const max = useMaxHeight();
return <div style={{ maxHeight: max, overflowY: "auto" }}>…</div>;Works in
Every MCP Apps host: ChatGPT, Claude, VS Code, Goose and the moonpeak inspector.
See all hooks in Runtime APIs.