S
SureUI

Unsaved Changes · SureUI

useUnsavedChanges asks before unsaved changes are lost: the browser's prompt on reload or close, an awaitable confirmLeave() for leaving a page, and Keep editing, Discard changes and an optional Save in a Dialog, Sheet or Drawer's footer before it closes.

npx shadcn@latest add @sureui/unsaved-changes
Preview Unsaved Changes on SureUI's site (opens in a new tab)
Loading the source for unsaved-changes…

unsaved-changes