Hotwire Svelte Helpers
This is a demo app for the npm package @csedl/svelte-hotwire-helpers
Overlays
These helpers are mainly for building overlays such as dropdowns, modals, and tooltips with Stimulus or Svelte in a Hotwire/Rails setup.
The main goal is to provide the same helpers for building overlays with both Stimulus and Svelte.
Main difference is that with Svelte, you may prefer building dropdown panels at runtime, when a user clicks a button, and destroying them when they close. With Stimulus, you need to render everything from the server. On the other hand, with Svelte in a Hotwire setup, you need to take care of cleaning up orphaned instances.
Stimulus
Stimulus has the advantage of being fully integrated into classic Rails views.
Svelte
Svelte is much more enjoyable when you need the kind of real reactivity that Hotwire can never provide.
Components are rendered with the svelte-on-rails gem.