Components
← All components

Unsaved Changes Guard

stimeo--dirty-form

Remembers what changed in a form and stops you leaving with unsaved edits.

  • Core
  • Rails / Turbo

Remembers the form's values as you found them and watches for changes. While something has changed it holds back both closing the page and moving on through Turbo, and it stops holding back once the values return to how they were. How you are asked is up to you: the browser's own prompt, or your own confirmation dialog. With several forms on a page you are still only asked once. When a submission succeeds, the values that were sent count as saved, while anything typed while it was in flight stays marked as changed so it cannot be thrown away by accident. It draws no dialog of its own and saves nothing for you.

running

Article form

Unsaved changes

Summary form

Unsaved changes

Keyboard

This component has no keyboard interactions of its own.