In my latest project I am using a combination of Rails, Stimulus JS, and Tailwind CSS. After some initial effort, I decided I would rather not do all of the new element prototyping in my Rails development environment.
Instead, I created a separate environment for rapid HTML / TailwindCSS / Stimulus JS prototyping.
Some of the main features of this environment include:
- Live-reloading for Tailwind.css changes, as well as both HTML and JS changes.
- Keep design and development workflows more separated.
So far, I have just used this environment to create interactive elements that I then easily port over to my Rails project, simply by copying the HTML partial, Stimulus controller(s), and my new @apply's to my Rails project. I am planning on using it to build out whole pages using multiple partials, but I just set this up today and have yet to see how effective it is for such a task.
Try out the environment if you are itching for a new workflow for your Rails/Stimulus/Tailwind projects!