Skip to content
Playground llms.txt
Docs in progress TKO docs are in progress. Examples, API details, and migration notes are still being revised.

Introduction

TKO v4.0.1

Modern Knockout, clarified

Reactive data binding and UI templating with zero runtime dependencies. Start with the package you need and move from overview to working bindings.

<script type="module">
import ko from 'https://esm.run/@tko/build.reference'
const name = ko.observable('TKO')
</script>
Terminal window
npm install @tko/build.reference

For Knockout 3.x compatibility, use @tko/build.knockout instead.

<div id="app">
<label>
Name
<input data-bind="textInput: name" />
</label>
<p>Hello, <strong data-bind="text: name"></strong>.</p>
</div>
<script src="https://cdn.jsdelivr.net/npm/@tko/build.reference/dist/browser.min.js"></script>
<script>
const ko = globalThis.tko
ko.applyBindings({ name: ko.observable('TKO') }, document.getElementById('app'))
</script>
  • Observables and computed valuesko.observable, ko.observableArray, ko.computed
  • Declarative bindingsdata-bind="text: msg" and the same binding APIs
  • Components and custom bindings — the component system and binding extensibility