AnalyzePlatypus / stimulus-library

A set of useful pre-built and configurable StimulusJS controllers for various common scenarios

Home Page:https://sub-xaero.github.io/stimulus-library/#/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stimulus-Library

Documentation | Full List of Controllers


npm npm bundle size (version)

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

{
  "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

import { Application } from "stimulus";
import { AutoSubmitFormController } from "stimulus-library";

const application = Application.start();
application.register("auto-submit-form", AutoSubmitFormController);
// Use kebab-case: `AutoSubmitFormController` -> `auto-submit-form`, `TurboFrameRefreshController` -> `turbo-frame-refresh`, etc.

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.

About

A set of useful pre-built and configurable StimulusJS controllers for various common scenarios

https://sub-xaero.github.io/stimulus-library/#/


Languages

Language:TypeScript 100.0%