Knockout : Home

2 min read Original article ↗

Simplify dynamic JavaScript UIs with the Model-View-View Model (MVVM) pattern

Key concepts

  • Declarative Bindings

    Easily associate DOM elements with model data using a concise, readable syntax

  • Automatic UI Refresh

    When your data model's state changes, your UI updates automatically

  • Dependency Tracking

    Implicitly set up chains of relationships between model data, to transform and combine it

  • Templating

    Quickly generate sophisticated, nested UIs as a function of your model data

More features

  • Free, open source (MIT license)
  • Pure JavaScript — works with any web framework
  • Small & lightweight — 66kb minified

    ... reduces to 25kb when using HTTP compression

  • No dependencies
  • Supports all mainstream browsers, even ancient ones

    IE 6+, Firefox 3.5+, Chrome, Opera, Safari (desktop/mobile)

  • Fully documented

    API docs, live examples, and interactive tutorials included

Get started

New: Interactive tutorials

Get started with knockout.js quickly, learning to build single-page applications, custom bindings and more with these interactive tutorials.

Live example

Run it:

Choose a ticket class:

You have chosen ($)

Source code:

By encapsulating data and behavior into a view model, you get a clean, extensible foundation on which to build sophisticated UIs without getting lost in a tangle of event handlers and manual DOM updates.