yarn add stimulus-checkbox
import {Application} from '@hotwired/stimulus'
import * as Checkbox from 'stimulus-checkbox'
const application = Application.start()
application.register('checkbox', Checkbox)
<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>