Safe area & overlays
Feed runtime safe-area insets into ARCUI and use the provider-owned overlay hierarchy for floating UI.
ARCUI separates runtime device geometry from design-system safe-area policy.
That same provider also owns the shared floating-UI hierarchy used by Modal, Dropdown, Toast, and Dialog.
Runtime insets come from the application
Supply the application's current inset values to the root provider:
<ARCUI
safeAreaInsets={{
top: insets.top,
right: insets.right,
bottom: insets.bottom,
left: insets.left,
}}
>
{children}
</ARCUI>Missing edges default to 0; negative values are normalized to 0.
ARCUI does not require a second safe-area package internally. Feed it values from whichever safe-area source the application already owns.
tokens.safeArea defines policy
Runtime insets answer what the device geometry is.
Safe-area tokens answer how each ARCUI surface should use it.
Per edge:
false -> ignore the device inset
0 -> use the device inset only
N -> use device inset + NThe built-in groups are:
screen
header
modal
dropdown
toast
dialogExample default behavior:
Screen.top = 0means use the device top inset exactly;Modal.bottom = 16means bottom inset plus 16 points;Toast.top = 16means top inset plus 16 points;- an edge configured as
falseignores that device inset for that component.
Provider-owned overlay order
ARCUI owns one predictable visual hierarchy:
Application
-> Modal
-> Dropdown
-> Toast
-> Dialog backdrop
-> DialogThis avoids competing local roots and lets ARCUI coordinate:
- z-index/elevation;
- safe-area positioning;
- presentation/dismissal lifecycle;
- background pointer interaction;
- assistive-technology isolation.
Do not mount ARCUI's internal host/provider components manually.
Modal is controlled state with rehosted visuals
const [visible, setVisible] = useState(false);
<Modal
visible={visible}
onClose={() => setVisible(false)}
>
<Content />
</Modal>The React declaration owns visible. ARCUI rehosts the visual Modal content into the root provider's Modal layer.
Because of that rehosting, React Context providers mounted below <ARCUI /> are not guaranteed to remain ancestors of Modal content. Put required shared context above ARCUI or pass the required values explicitly through application composition.
Dropdown is anchored but still provider-hosted
Dropdown measures/anchors from its trigger while rendering its visual overlay through the shared provider layer.
While a Dropdown is presented, underlying application interaction is disabled and background content is hidden from assistive-technology traversal.
Toast and Dialog are imperative global feedback
Toast:
const id = showToast({ message: "Saved" });
hideToast(id);Dialog:
showDialog({
title: "Delete item?",
actions: [
{ label: "Cancel", type: "cancel" },
{ label: "Delete", type: "destructive", onPress: removeItem },
],
});Both APIs require a mounted ARCUI provider because the provider owns the global lifecycle controller.
Accessibility isolation is semantic, not animated
Modal/Dropdown/Dialog background isolation follows the actual presented lifecycle managed by React/provider state.
It does not infer “open” from an animation SharedValue.
That distinction keeps screen-reader state stable while visual entry/exit motion runs independently.
Related components
Screen safe-area policy and theme-aware background.
Header layout with ARCUI safe-area ownership.
Controlled sheet lifecycle, stack behavior, and rehosting.
Anchored provider-hosted menu.
Provider-owned transient global feedback.
Single global dialog lifecycle and background isolation.