Beautiful Rails confirmation dialogs (with zero JavaScript) | Boring Rails: Skip the bullshit and ship fast
18-Dec-2025 547
Turbo’s data-turbo-confirm attribute is convenient for quick confirmation dialogs, but the native confirm() prompt it triggers looks dated and out of place. If you want a styled confirmation dialog that matches your app’s design, the traditional approach recommends a lot of JavaScript — a Stimulus controller to open and close the dialog, event listeners for keyboard handling, and coordination between the trigger and the modal.
But, recent browser updates have changed the game. Invoker Commands landed in Chrome 131 and Safari 18.4, giving us declarative dialog control. Combined with @starting-style for animations, we can now build beautiful, animated confirmation dialogs without writing any JavaScript.
Beautiful Rails confirmation dialogs (with zero JavaScript) | Boring Rails: Skip the bullshit and ship fast #ruby #rubydeveloper #rubyonrails #Beautiful #Rails #confirmation #dialogs #(with #JavaScript) #Boring #Rails: #bullshit #javascript) https://rubyonrails.ba/link/beautiful-rails-confirmation-dialogs-with-zero-javascript-boring-rails-skip-the-bullshit-and-ship-fast