Components
← All components

Submit Once

stimeo--submit-once

Disables the submit button on submit to block double submits, then restores on completion.

The stimeo--submit-once controller disables the form's submit button(s) on submit to prevent a double submission, sets aria-busy on them and data-submitting on the form, and swaps the triggering button's label for a busy label (per-button data-submit-once-busy-label overrides the form's busyLabel Value). It restores on Turbo's turbo:submit-end — re-enabling the buttons and putting labels back — or after timeout ms, and can return focus to the button with restoreFocus. The Headless superset of Rails' disable_with; it dispatches stimeo--submit-once:start / :end. Behavior only — no spinner is drawn (pair with Spinner). The submit-end listener and timeout are torn down on disconnect, and connect clears any busy state left in a restored cache snapshot so a button is never stuck disabled.

running