Toast
Available anywhere insideUIProvider.
In a browser window at least 1024 px wide with a mouse, toasts sit in the bottom-right corner. Everywhere else they appear at the bottom center.
duration is in milliseconds, default 3000 (5000 with an action); 0 keeps the toast until dismissed. variant is default, success or danger. action: { label, onPress } adds a button, such as “View” or “Retry”; pressing it dismisses the toast.
Undo instead of confirm
For anything that can be put back, offer undo instead of asking first, the way mail apps do. Change the screen right away, then callundoable. The real work runs only once the toast is gone without an undo.
The real work, such as the API delete. Runs when the toast times out.
commit runs on pagehide. That is best effort: a request started then may not finish. For edits that must survive going offline, make the offline queue the commit: commit: () => outbox.add(op).
Skeleton
Placeholder shapes while content loads.width?, height? (default 16), circle?, radius?.
Three shapes cover most loading states. Match the layout the content will have, so nothing jumps when it arrives.
Spinner
size defaults to 20. It inherits the current text color.
ProgressBar
Callout; for empty lists, EmptyState.
LoadingScreen and CenterScreen
LoadingScreen is what your app shows while auth or its first read resolves: a centered spinner on the page background.
LoadingScreen takes background?, color? (the spinner’s arc), size? (default 28), label? (spoken while waiting) and children to draw your own splash instead of the spinner. CenterScreen is the full-screen centered layout it is built on, for sign-in prompts, gates and splashes; it takes background? and any <div> attribute.
LoadMore
The foot of a paged list. It loads the next page as it scrolls into view, and keeps a button as the fallback for lists too short to scroll.Load as the foot scrolls into view. Turn it off where the page shouldn’t grow under the reader.