[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-70674":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":28,"discoverSource":29},70674,"stimulus","hotwired\u002Fstimulus","hotwired","A modest JavaScript framework for the HTML you already have","https:\u002F\u002Fstimulus.hotwired.dev\u002F",null,"TypeScript",13051,439,192,30,0,2,11,70.03,"MIT License",false,"main",true,[],"2026-06-12 04:00:56","# \u003Cimg src=\"assets\u002Flogo.svg?sanitize=true\" width=\"24\" height=\"24\" alt=\"Stimulus\"> Stimulus\n\n### A modest JavaScript framework for the HTML you already have\n\nStimulus is a JavaScript framework with modest ambitions. It doesn't seek to take over your entire front-end—in fact, it's not concerned with rendering HTML at all. Instead, it's designed to augment your HTML with just enough behavior to make it shine. Stimulus pairs beautifully with [Turbo](https:\u002F\u002Fturbo.hotwired.dev) to provide a complete solution for fast, compelling applications with a minimal amount of effort.\n\nHow does it work? Sprinkle your HTML with controller, target, and action attributes:\n\n```html\n\u003Cdiv data-controller=\"hello\">\n  \u003Cinput data-hello-target=\"name\" type=\"text\">\n\n  \u003Cbutton data-action=\"click->hello#greet\">Greet\u003C\u002Fbutton>\n\n  \u003Cspan data-hello-target=\"output\">\u003C\u002Fspan>\n\u003C\u002Fdiv>\n```\n\nThen write a compatible controller. Stimulus brings it to life automatically:\n\n```js\n\u002F\u002F hello_controller.js\nimport { Controller } from \"@hotwired\u002Fstimulus\"\n\nexport default class extends Controller {\n  static targets = [ \"name\", \"output\" ]\n\n  greet() {\n    this.outputTarget.textContent =\n      `Hello, ${this.nameTarget.value}!`\n  }\n}\n```\n\nStimulus continuously watches the page, kicking in as soon as attributes appear or disappear. It works with any update to the DOM, regardless of whether it comes from a full page load, a [Turbo](https:\u002F\u002Fturbo.hotwired.dev) page change, or an Ajax request. Stimulus manages the whole lifecycle.\n\nYou can write your first controller in five minutes by following along in the [Stimulus Handbook](https:\u002F\u002Fstimulus.hotwired.dev\u002Fhandbook\u002Fintroduction).\n\nYou can read more about why we created this new framework in [The Origin of Stimulus](https:\u002F\u002Fstimulus.hotwired.dev\u002Fhandbook\u002Forigin).\n\n## Installing Stimulus\n\nYou can use Stimulus with any asset packaging systems. And if you prefer no build step at all, just drop a `\u003Cscript>` tag on the page and get right down to business.\n\nSee the [Installation Guide](https:\u002F\u002Fstimulus.hotwired.dev\u002Fhandbook\u002Finstalling) for detailed instructions.\n\n## Getting Help\n\nLooking for the docs? Once you've read through the Handbook, consult the [Stimulus Reference](https:\u002F\u002Fstimulus.hotwired.dev\u002Freference\u002Fcontrollers) for API details.\n\nHave a question about Stimulus? Connect with other Stimulus developers on the [Hotwire Discourse](https:\u002F\u002Fdiscuss.hotwired.dev\u002F) community forum.\n\n## Contributing Back\n\nFind a bug? Head over to our [issue tracker](https:\u002F\u002Fgithub.com\u002Fhotwired\u002Fstimulus\u002Fissues) and we'll do our best to help. We love pull requests, too!\n\nWe expect all Stimulus contributors to abide by the terms of our [Code of Conduct](CODE_OF_CONDUCT.md).\n\n### Development\n\n- Fork the project locally\n- `yarn install`\n- `yarn start` - to run the local dev server with examples\n- `yarn test` - to run the unit tests\n- `yarn lint` - to run the linter with ESLint\n- `yarn format` - to format changes with Prettier\n\n## Acknowledgments\n\nStimulus is [MIT-licensed](LICENSE.md) open-source software from [Basecamp](https:\u002F\u002Fbasecamp.com\u002F), the creators of [Ruby on Rails](https:\u002F\u002Frubyonrails.org).\n\n---\n\n© 2024 Basecamp, LLC.\n","Stimulus 是一个轻量级的 JavaScript 框架，旨在为现有的 HTML 添加行为以增强其功能。它通过在 HTML 中添加控制器、目标和动作属性来实现与页面元素的交互，并利用 TypeScript 编写兼容的控制器逻辑，自动激活这些行为。该框架特别适合于希望保持前端简洁，同时需要为静态页面增加动态特性的场景，如表单验证或用户交互反馈等。此外，Stimulus 无缝集成 Turbo 技术，可以轻松构建响应快速且用户体验良好的应用。由于不涉及复杂的渲染过程，因此非常适合不需要全面重写现有项目但又想提升用户体验的情况。","2026-06-11 03:33:33","high_star"]