stimulus-checkbox
v2.0.0
Published
Stimulus controller to toggle/untoggle multiple checkboxes
Downloads
127
Maintainers
Readme
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>