On this page
Overview
Stimulus augments server-rendered HTML instead of replacing it. data-controller, targets, and actions connect markup to small JavaScript controller classes, while DOM changes automatically drive controller lifecycle as elements appear and disappear.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Connect HTML and JavaScript with controller, target, and action attributes
Markup declares controllers, targets, and actions, while JavaScript controller classes implement event handling and DOM updates. This makes the behavior attachment points explicit in server-rendered views.
Sources: [1]
Automatically manage controller lifecycle as the DOM changes
Stimulus continuously watches the page and connects or disconnects controllers when relevant elements or attributes appear or disappear, including changes caused by Turbo or Ajax updates.
Sources: [1]
Augment existing HTML instead of owning frontend rendering
Stimulus is not intended to render the entire frontend. It adds the interaction layer to HTML generated elsewhere and pairs naturally with Turbo as part of Hotwire.
Sources: [1]
Best fit
Fits server-rendered apps that need localized interactive behavior
It works well when an HTML-centric application wants menus, forms, modals, keyboard actions, or other interactions without rebuilding the whole frontend around an SPA framework.
Sources: [1]
Before adoption
The stable release remains 3.2.2 while current main is still versioned 3.2.2
The latest GitHub release is v3.2.2 from 2023, although the repository remains active in 2026. Current main still reports package version 3.2.2, so unreleased main-branch changes should not be treated as stable API.
Runtime behavior assumes a browser DOM lifecycle
Stimulus is built around DOM elements, events, and attributes. Controllers should be designed for browser-side connect/disconnect behavior, including DOM replacement performed by Turbo.
Sources: [1]
Official sources
- [1]Stimulus v3.2.2 README(2026-10-04)
- [2]Stimulus v3.2.2 release(2026-10-04)
- [3]Stimulus v3.2.2 package metadata(2026-10-04)
- [4]Stimulus current main package metadata(2026-10-04)
- [5]Stimulus MIT license(2026-10-04)
Supplemental curator note
Stimulus does not aim to render the whole frontend. It is designed to preserve server-rendered HTML and add only the interactions needed through small controllers.
Try it in 3 steps
- 1
Add Stimulus 3.2.2 as a local dependency
Pin the installation to the stable 3.2.2 release.
mkdir -p stimulus-demo && cd stimulus-demo && npm init -y >/dev/null && npm install @hotwired/stimulus@3.2.2 - 2
Inspect the package version, license, and entry point
Read version, MIT license, and bundle metadata without starting a browser.
cd stimulus-demo && node -e 'const p=require("./node_modules/@hotwired/stimulus/package.json"); console.log(`version=${p.version} license=${p.license} main=${p.main}`)' - 3
Create a minimal controller-to-HTML example
Inspect how a controller, action, and target connect without starting a development server.
cd stimulus-demo && printf '%s\n' 'import { Controller } from "@hotwired/stimulus"' 'export default class extends Controller {' ' static targets = ["output"]' ' greet() { this.outputTarget.textContent = "Hello from Stimulus" }' '}' > hello_controller.js && printf '%s\n' '<div data-controller="hello">' ' <button data-action="click->hello#greet">Greet</button>' ' <span data-hello-target="output"></span>' '</div>' > fragment.html
Growth
Growth trends · Last 30 days
13,103 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 0
- Open PRs
- 41
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
- Stars
- 13,103
- Forks
- 442
- Watchers
- 190
- Open issues
- 30
- Contributors
- 87
- Owner type
- Organization
- Primary language
- TypeScript
- License
- MIT
- Repository last updated
- Sep 13, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Cheerio30,516 Stars
3 shared tag(s) · Same language
parse, query, and rewrite HTML or XML with a lightweight jQuery-style selector API
TypeScript - Cropper.js13,902 Stars
3 shared tag(s) · Same language
move and resize image selections in the browser and export the cropped result as a Canvas
TypeScript - WXT10,570 Stars
3 shared tag(s) · Same language
build Chrome and Firefox extensions with file-based entrypoints and an HMR development workflow
TypeScript - Expo52,566 Stars
4 shared tag(s) · Same language
build React Native apps for Android, iOS, and web from one project model
TypeScript - Vue 2212,828 Stars
3 shared tag(s) · 1 shared category(s) · Same language
Maintain Vue 2 as an EOL legacy framework while planning Vue 3 migration and security or compliance handling
TypeScript - Angular101,019 Stars
3 shared tag(s) · 1 shared category(s) · Same language
Unify components, signals/DI, routing, forms, SSR/hydration, and CLI tooling in one TypeScript web application platform
TypeScript
Report incorrect information
Tell us if any listing information is incorrect or outdated.