stimulus-checkbox

2.0.0 • Public • Published

License: MIT

https://nodei.co/npm/stimulus-checkbox.png?downloads=true&downloadRank=true&stars=true

Usage

Installation

yarn add stimulus-checkbox

Register the controller to your StimulusJS application

import {Application} from '@hotwired/stimulus'
import * as Checkbox from 'stimulus-checkbox'

const application = Application.start()
application.register('checkbox', Checkbox)

within your view

<div data-controller="checkbox">
  <input
    type="checkbox"
    data-checkbox-target="btn"
    data-action="change->checkbox#toggle"
  />
  <input
    type="checkbox"
    data-checkbox-target="box"
    data-action="change->checkbox#toggleOne"
  />
</div>

Package Sidebar

Install

npm i stimulus-checkbox

Weekly Downloads

34

Version

2.0.0

License

MIT

Unpacked Size

16.6 kB

Total Files

22

Last publish

Collaborators

  • luciengeorge