Markus Sadler PRO said over 2 years ago on Hotwire Modals :
One enhancement for this approach is to wrap the form in a turbo_frame_tag as well and use a separate template to just update the form. This avoids any repeat animation that might look weird.

_form.html.erb
<%= turbo_frame_tag :project_form do %>
  <%= form_with model: project do |f| %>
    ...
  <% end %>
<% end %>

create.turbo_stream.erb
<%= turbo_stream.replace :project_form do %>
  <%= render partial: 'form', locals: { project: @project } %>
<% end %>

   We are using TailwindCSS and it works by using the tailwindcss-stimulus-components. The only thing you need to make sure is that `data-modal-open-value` is set on the controller element.