https://github.com/daun/stimuli
Useful Stimulus controllers
https://github.com/daun/stimuli
Last synced: about 1 year ago
JSON representation
Useful Stimulus controllers
- Host: GitHub
- URL: https://github.com/daun/stimuli
- Owner: daun
- License: mit
- Created: 2020-08-04T10:25:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-04T10:56:39.000Z (almost 6 years ago)
- Last Synced: 2024-04-26T06:03:02.737Z (about 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stimuli ⚡️
[](https://www.npmjs.com/package/stimuli)
[](./LICENSE)
[](https://bundlephobia.com/result?p=stimuli)
Collection of useful single-responsibility Stimulus controllers.
**Work in progress**. Needs proper tests.
## Installation
```bash
npm install stimuli
```
## Usage
Import and register the desired controllers with your application.
```js
import { Controller } from 'stimulus'
import { MeasureController } from 'stimuli'
const application = Application.start()
application.register('measure', MeasureController)
```
## Controllers
### Autoplay
Autoplay video or audio files. Retries with a muted version of the video if it
failes on first try.
### Measure
Measure the deimensions of an element and stores the value in a CSS custom
property.
## License
[MIT](https://opensource.org/licenses/MIT)