OSS TanbouSign in with GitHub

add behavior to existing HTML through controller, target, and action attributes with an HTML-first JavaScript framework

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
13,103
Primary language
TypeScript
License
MIT
Repository last updated
Sep 13, 2026
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.

Sources: [2][3][4]

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. [1]Stimulus v3.2.2 README(2026-10-04)
  2. [2]Stimulus v3.2.2 release(2026-10-04)
  3. [3]Stimulus v3.2.2 package metadata(2026-10-04)
  4. [4]Stimulus current main package metadata(2026-10-04)
  5. [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. 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. 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. 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
Check the official README

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
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?