Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Sub-Xaero/stimulus-library
A set of useful pre-built and configurable StimulusJS controllers for various common scenarios
https://github.com/Sub-Xaero/stimulus-library
component-library stimulus stimulus-js stimulusjs
Last synced: 2 months ago
JSON representation
A set of useful pre-built and configurable StimulusJS controllers for various common scenarios
- Host: GitHub
- URL: https://github.com/Sub-Xaero/stimulus-library
- Owner: Sub-Xaero
- License: mit
- Created: 2021-01-16T02:38:56.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-11T14:30:58.000Z (2 months ago)
- Last Synced: 2024-11-12T12:49:44.148Z (2 months ago)
- Topics: component-library, stimulus, stimulus-js, stimulusjs
- Language: TypeScript
- Homepage: https://sub-xaero.github.io/stimulus-library/#/
- Size: 16.5 MB
- Stars: 157
- Watchers: 2
- Forks: 12
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-stimulusjs - stimulus-library - A set of useful pre-built and configurable StimulusJS controllers for various common scenarios. (Packages)
- awesome-hotwire - stimulus-library - A curated collection of Stimulus controllers. (**Awesome Hotwire** [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) / Stimulus)
- awesome-hotwire - stimulus-library - A curated collection of Stimulus controllers. (**Awesome Hotwire** [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) / Stimulus)
README
# Stimulus-Library
[Documentation](https://sub-xaero.github.io/stimulus-library/) | [Full List of Controllers](https://sub-xaero.github.io/stimulus-library/)
---
![npm](https://img.shields.io/npm/dt/stimulus-library)
![npm bundle size (version)](https://img.shields.io/bundlephobia/minzip/stimulus-library/latest?label=minified%20size)
---## Installation
To get started, you'll need to add the `stimulus-library` package to your project.
To do so, either add `stimulus-library` to your package.json manually
```json
{
"dependencies": {
"stimulus-library": "latest"
}
}
```or run
`npm install --save stimulus-library` or `yarn add stimulus-library`Then, to get started, import and register the controllers you want to use.
*Please Note* as below, that when registering the name for the controller, you should use `kebab-case` and omit the `-controller` suffix.
```js
import { Application } from "@hotwired/stimulus";
import { AutoSubmitFormController } from "stimulus-library";const application = Application.start();
application.register("auto-submit-form", AutoSubmitFormController);
```## Tree-shaking
If you use the ESM builds of the library, this library fully supports tree-shaking,
only the controllers you directly import will be bundled with your application.