Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

knockout.toggle

civicsource15MIT2.0.0

Knockout binding to toggle boolean view model properties

knockout, toggle

readme

Knockout Toggle Binding

Knockout binding to toggle boolean view model properties.

Installation

npm install knockout-toggle

Usage

Include the script with your module bundler, then use the binding like so:

<button data-bind="toggle: myProp">Toggle the thing</button>
<span data-bind="visible: myProp">It's ON</span>