useViewport reports those constraints so the view can size itself to the space the host actually gives it. It re-renders on every resize, so read the host theme from useUser instead.
Example
The carousel fits its scroll area to the height the host offers and keeps content clear of notches and home indicators.Returns
useViewport returns the host’s current viewport for the view, as a ViewportState.
maxHeight
undefined when the host does not report a height limit. It updates as the host resizes the view’s container.
safeArea
0.
useUser
Read the host’s theme, locale, and device capabilities
useRequestSize
Ask the host to resize the view
Design for the Host
Adapt the view to the host’s surface