Screen
The page container. It applies the theme background, reserves the bottom safe area, and can make room for the keyboard.Grow the bottom padding by the native keyboard’s height, so a form at the bottom stays visible.
div attribute.
Header
A safe-area-aware app header. It isposition: fixed rather than sticky, and renders a spacer of its own measured height, so:
- it never stretches when a native WebView overscrolls, which a sticky header does;
- the content below it starts in the right place with no hard-coded offset.
Show a close button that closes the mini app. Defaults to
true inside a shell and false in a browser, where there is nothing to close.PullToRefresh
A scroll container that refreshes when pulled down from the top. Give it a bounded height (a flex child, orheight: 100%).
Called when the user pulls past the threshold. The spinner stays until the promise settles.
Ride on whatever already scrolls above it (
#root or the window) instead of being the scroll region. Use it for a page under a fixed header with no bounded height.StackNavigator the indicator is Material’s: a disc that comes down over the content.
usePullToRefresh
The same gesture for a scroll container you already own. Spreadhandlers on it and render PullIndicator at its top:
pull (distance in px), progress (0 to 1 toward the threshold), refreshing, dragging and handlers.