Stimulus
ELI5 — The Vibe Check
Stimulus is a modest JavaScript framework that adds behavior to your HTML using data attributes. It doesn't render HTML or manage state — it just connects to existing markup and adds interactivity. It's the JavaScript framework for people who think most JavaScript frameworks do too much.
Real Talk
Stimulus is a JavaScript framework from Basecamp (part of Hotwire) that provides a structured way to enhance server-rendered HTML. Controllers are connected to DOM elements via data-controller attributes, with actions, targets, and values providing a convention for organizing JavaScript behavior.
Show Me The Code
<div data-controller="toggle">
<button data-action="click->toggle#toggle">Show</button>
<div data-toggle-target="content" class="hidden">Hello!</div>
</div>
When You'll Hear This
"Stimulus controllers are tiny and focused — one controller per behavior" / "We pair Stimulus with Turbo for an SPA-like experience without the SPA complexity"
Related Terms
Alpine.js
Alpine.js is like jQuery had a baby with Vue, and that baby was really into minimalism.
HTMX
HTMX lets you build interactive web apps by adding special attributes to regular HTML — no JavaScript framework needed.
Progressive Enhancement
Progressive enhancement means building a web page that works for everyone at its most basic level, then layering on fancy features for browsers that suppor...
Turbo
Turbo (from Hotwire) makes traditional server-rendered apps feel like SPAs by intercepting link clicks and form submissions to swap only the page body via...