Stimulus Components

Simple and powerful Stimulus JS library for common JavaScript behavior.

Stimulus JS is a modest yet powerful JavaScript framework that augments your HTML with just enough behavior to make it shine.

We all share common behaviors between our applications and no one want to reinvent the wheel. That is why the Stimulus Components library exists. To bring you generic and customizable controllers in your applications.

Every components of this library share a same philosophy:

  • Have a great documentation and demo.
  • Can be extended and customized for your needs with a strong API.
  • Be easy to learn and use.
  • Be as close as possible to the Stimulus conventions.

The Stimulus Components library is already used by hundreds of developers and many companies.

πŸ§ͺ Quick example

Here is an example of how use Stimulus Content Loader.

1. Install the package:

$ yarn add stimulus-content-loader

2. Import it in your application:

import { Application } from '@hotwired/stimulus'
import ContentLoader from 'stimulus-content-loader'

const application = Application.start()
application.register('content-loader', ContentLoader)

3. Use it in your views

<div
  data-controller="content-loader"
  data-content-loader-url-value="/comments"
>
  <i class="fas fa-spinner fa-spin"></i>
  Loading comments... This content will be replaced by the content returned by the url /comments.
</div>

4. Enjoy it! πŸŽ‰

It is as easy as that.

Numbers speak for themselves

Stimulus Components is the library of choice when you are working with Stimulus JS.

Packages
25+
Contributors
15+
Downloads last year
1,638,000+

β˜•οΈ Sponsors

Stimulus Component is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing. You can support Stimulus Components development on Github Sponsors. πŸ™

πŸ‘· Contributing

Do not hesitate to contribute to the project by adapting or adding features ! Bug reports or pull requests are welcome.

Don’t forget to drop a 🌟 on Github to support the project.

πŸ“ License

This project is released under the MIT license.