Introduction
Modern Knockout, clarified
Choose the right TKO build and get moving quickly.
Start with the package you actually need, understand the migration path, and move from overview to working bindings without digging through the repo first.
What is TKO?
Section titled “What is TKO?”TKO is the monorepo and documentation home for the modern Knockout builds.
It keeps the familiar Knockout model of observables, computed values, and declarative bindings, while publishing the runtime as modular packages instead of a single legacy distribution.
Choose a build
Section titled “Choose a build”Use this rule of thumb:
@tko/build.knockout
Start here if you want the compatibility-focused build and the closest match to a traditional Knockout application.
Recommended for modular setups@tko/build.reference
Use this if you want the leaner reference build and are comfortable composing a more modular setup yourself.
4.x prerelease line
Pin the exact version you test with. The packages are usable, but the docs and example system are still being tightened up.
If you are upgrading an existing Knockout 3.x application, start with the Knockout 3 to 4 Guide.
Current status
Section titled “Current status”TKO packages are still published as 4.x prereleases. Pin the exact version you test with, and expect some docs and examples to keep evolving.
Quick start
Section titled “Quick start”Install the compatibility-focused build:
npm install @tko/build.knockout# oryarn add @tko/build.knockout# orbun add @tko/build.knockoutIf you want the modular reference build instead:
npm install @tko/build.referenceFor a browser-global script tag, use the Knockout-compatible build:
<script src="https://cdn.jsdelivr.net/npm/@tko/build.knockout/dist/browser.min.js"></script>First binding example
Section titled “First binding example”<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.knockout/dist/browser.min.js"></script><script> const viewModel = { name: ko.observable('TKO') };
ko.applyBindings(viewModel, document.getElementById('app'));</script>What stays familiar
Section titled “What stays familiar”- Observables and computed values
The reactive model is still centered on
ko.observable,ko.observableArray, andko.computed. - Declarative bindings
Bind UI to state with the same
data-bindstyle APIs used in classic Knockout. - Components and custom bindings The component system and binding extensibility remain core parts of the framework.
What to read next
Section titled “What to read next”Bindings
Start with the behavior readers touch first: binding syntax, common bindings, and view updates.
State modelObservables
Review observables, observable arrays, extenders, and rate limiting before building larger flows.
CompositionComponents
Move on to reusable UI, loading strategies, and the edges where app architecture starts to matter.
Community
Section titled “Community”Find Knockout online at: