What problem does it solve?
This Skill enables developers to add interactivity to Rails views using Hotwire (Turbo, Frames, Streams, Morph) and Stimulus controllers, reducing the need for custom JavaScript while preserving accessibility and progressive enhancement.
Core Features & Use Cases
- Hotwire integration: leverage Turbo Drive for faster navigation, Turbo Streams for real-time updates, and Turbo Morph for state-preserving DOM updates.
- Stimulus-driven UI: attach lightweight JavaScript behavior to HTML via data attributes for dynamic UI like modals, counters, and dropdowns.
- Use Case: turn a traditional Rails app into an interactive, SPA-like experience with server-rendered HTML and minimal client code.
Quick Start
In a Rails project, add Turbo Rails and Stimulus, configure import maps or webpack, then annotate views with data-controller and data-turbo actions. Start by converting a list update to use Turbo Streams and morphing, and progressively enhance with Stimulus where needed.