This package has been deprecated

Author message:

Each controller of this library has been extract in their dedicated package. You can find all of them https://github.com/stimulus-components.

stimulus-components

3.0.0 • Public • Published

Stimulus components

Donate Netlify Status

Getting started

This library is a set of multiple Stimulus controllers.

Installation

This library supports tree-shaking so you can import only the controllers you need.

$ yarn add stimulus-components

And use it in your JS file:

import { Application } from "stimulus"
import { Reveal } from "stimulus-components"

const application = Application.start()
application.register("reveal", Reveal)

Basic Usage

See Demo.

Documentation is available as README in controllers folders.

Extending Components

You can use inheritance to extend the functionality of any Stimulus components.

import { Reveal } from "stimulus-components"

export default class extends Reveal {
  connect() {
    super.connect()
    console.log("Do what you cant here.")
  }
}

These controllers will automatically have access to targets defined in the parent class.

If you override the connect, disconnect or any other methods from the parent, you'll want to call super.method() to make sure the parent functionality is executed.

Development

Project setup

$ yarn install
$ yarn dev

Tests

Jest and Puppeteer are responsible to test this component:

$ yarn test

Linter

Prettier and ESLint are responsible to lint and format this component:

$ yarn lint
$ yarn format

Contributing

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

License

This project is released under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i stimulus-components

Weekly Downloads

2

Version

3.0.0

License

MIT

Unpacked Size

42.3 kB

Total Files

29

Last publish

Collaborators

  • guillaumebriday