hotwire-patterns
OfficialPractical Hotwire patterns for Rails UIs
System Documentation
What problem does it solve?
Provides concise, opinionated guidance for adding Hotwire interactivity to Rails applications so teams avoid fragile ad-hoc implementations and inconsistent UX. It helps decide when to use Turbo Frames, Turbo Streams, Stimulus, or React islands and documents common pitfalls, error handling, and testing strategies.
Core Features & Use Cases
- Decision guidance: A quick table that maps common interaction needs to the right Hotwire primitive (Turbo Frame, Turbo Stream, Stimulus, React via Turbo Mount).
- Patterns and examples: Inline editing, lazy-loading frames, modal/drawer frames, tabbed frames, multi-target stream updates, broadcasting, and Stimulus controller conventions.
- Integrations and constraints: Advice on using Bali ViewComponents, testing (Minitest/Jest examples), performance tips, and error/status handling for 4xx/5xx responses.
- Developer workflow: Recommendations for minimal implementations, progressive enhancement, and how to structure turbo_stream templates and controller responses.
Quick Start
Add Turbo Frames for scoped updates, Turbo Streams for multi-target or real-time broadcasts, and a Stimulus controller for client-side behavior to implement inline editing on the messages index.
Dependency Matrix
Required Modules
None requiredComponents
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: hotwire-patterns Download link: https://github.com/Grupo-AFAL/claude-plugins/archive/main.zip#hotwire-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.