Sheet
Fixed heights to rest at, like iOS sheet detents:
medium is half the screen, large all of it. The sheet opens at the first one; drag between them, and down from the lowest to close. Without detents the sheet is as tall as its content.KeyboardAvoidingView; that would pad twice.
ActionSheet
label, icon?, destructive? and onPress. cancelLabel sets the cancel row’s text (default 'Cancel'); null hides it.
Dialog
dismissable (default true) controls whether a scrim tap or Back closes it.
For a form rather than a short message, give it a width (default 380; it never outgrows the window) and a footer. The footer stays pinned under the content while a long form scrolls, so its buttons are always in reach. Point a submit button in the footer at its form with form="<id>":
Modal
Maximum width: 400, 560, 760, 1000 px, or the viewport minus a margin.
useConfirm
Imperative confirm and alert dialogs that return promises. Available anywhere insideUIProvider.
confirm takes title?, message?, confirmLabel?, cancelLabel?, danger? and resolves true or false. alert takes title?, message?, okLabel?.
With UIProvider native the dialog takes the iOS or Material look in the mobile shell; with systemDialogs (on by default in the desktop shell) it becomes the OS’s own alert. See UIProvider.
ConfirmDialog
useConfirm resolves as soon as the user answers. When the dialog has to stay up while the request is in flight, drive a ConfirmDialog from your own state instead:
Style the confirm button as destructive. The default confirm label is “Delete”.
confirmLabel?, cancelLabel? and locale?.
LogoutConfirm
A sign-out confirmation with a checkbox to end every session on this device. When ticked, the logout link carriessession=all. The link always comes from the SDK’s logoutUrl.
Handle the navigation yourself. Without it, the dialog navigates to the link.
Menu
label, icon?, onClick, destructive? and disabled?, or are { separator: true }. Also takes placement? and matchWidth?.
ContextMenu
Long-press (or right-click) actions for an element, the way each platform does them:- iOS: the element lifts over a blurred, dimmed screen, and the menu opens next to it.
- Android: a Material menu pops up where the finger is.
- Desktop and web: right-click opens it at the cursor; the keyboard’s menu key or Shift+F10 opens it on a focused element.
Each item has
label, onPress, and optionally icon, destructive, disabled, shortcut (a hint shown on desktop, such as “⌘E”) and keys (a key combination that runs the item while the element has keyboard focus). { separator: true } draws a divider.iOS only: what a tap would open, shown large above the menu instead of the lifted element (“peek”). Keep it light: a cover and a few lines.
UIProvider’s look. In the Android shell with systemDialogs, and in the desktop shell by default, it uses the system menu.
useMenuButton
The same menu opened by a tap on a button: a nav bar’s pull-down menu on iOS, Material’s overflow menu, a desktop menu button.show(button), the node to render, and isOpen.
ReportSheet
A sheet to report content or an account to moderators. The sheet owns the form; you send the report with your own API call.Send the report. A rejection keeps the sheet open with an error.
The reasons that make sense here, in this order. Defaults to all of
REPORT_CATEGORIES: child_safety, harassment, inappropriate, spam, impersonation, copyright, other.labels overrides any text, including each category’s label.
MediaViewer
Full-screen photos and videos, the way a photos app shows them: pinch or double-tap to zoom, swipe sideways between items, drag down to close, tap to hide the bar. It opens out of the thumbnail and closes back into it. Arrow keys step through items and Escape closes; on desktop, ⌘ or Ctrl with the scroll wheel zooms.Each has
src, and optionally type ('image' or 'video'; videos play and only swipe and close), alt, width / height (lets the zoom start before the image loads), thumb (shown at once while src loads; a video’s poster) and caption.The thumbnail each item opened from. Without it the viewer fades in and out.
Add a history entry on open, so Android’s back button closes the viewer. Turn it off if your router already puts the viewer in the URL.
Tooltip
label, placement?, delay? (default 350 ms).
Popover
The low-level anchored overlay thatMenu and Tooltip are built on. It flips and clamps to stay on screen, and closes on an outside click, Back or Escape.
open, onClose, anchorRef, placement? (default bottom-start), gap? (default 6), matchWidth?. computePosition is exported for custom anchored UI.