Stimulus
Stimulus is a modest JavaScript framework that works with server-rendered HTML. It enhances static HTML with behavior through controllers, targets, and actions, making it ideal for projects using Hotwire or traditional server-side frameworks.
In This Section
- Getting Started — Controllers, targets, actions, and basic setup
- Lifecycle & State — Controller lifecycle callbacks and state management
- Cross-Controller Communication — Events, outlets, and shared state
- Real-World Patterns — Forms, modals, infinite scroll, and lazy loading
Pages in this section
Stimulus Controllers Explained — Step-by-Step Beginner's Guide
Learn Stimulus controllers, targets, and actions from scratch. Master the Hotwire JavaScript framework with examples, analogies, and a runnable sandbox.
✓ LiveStimulus Lifecycle & State Management Explained — Complete Guide
Master Stimulus controller lifecycle: initialize, connect, disconnect callbacks. Learn state management with values, classes API, and private fields.
✓ LiveStimulus Cross-Controller Communication — Events, Outlets, and Patterns
Communicate between Stimulus controllers using custom events, outlets, event bus patterns, and shared state. Practical guide with runnable examples.
✓ LiveStimulus Real-World Patterns — Forms, Modals, Autocomplete, and More
Production-ready Stimulus patterns: form validation, modals with focus trapping, autocomplete with debounce, infinite scroll, and Turbo integration.
✓ Live