Skip to content

luciengeorge/stimulus-checkbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published