Lightweight and powerful data binding + templating solution for building modern web applications.

📥Download 0.6.9

3.4kb minified and gzipped


Agnostic by design

Rivets.js is completely agnostic about your model / controller layer and works well with existing libraries that employ an event-driven model such as Backbone.js and Stapes.js. It ships with a built-in adapter for subscribing to plain JS objects using ES5 natives, however this can be replaced with a Watch.JS adapter or an Object.observe adapter.

Highly configurable

From the event handlers to the template delimiters, the attribute prefixes to the preloading of data. It's all configurable and tunable at the application level as well as locally to individual views.



<input rv-value="item.summary">

Describe how your underlying data is reflected in the DOM and vice-versa. All binders create a binding that is automatically updated when model data changes or when the user interacts with the DOM.


<rv-toggle on="item.complete">

Define reusable subviews, instantiable as a custom element. Each component gets it's own augmentable view and scope.


{ item.due | fromNow | duration }

Format dates, numbers, currencies and implement logic gates and conversions. Formatters work in a similar fashion to the Unix pipeline, so you can stack as many of them together as you like.


<dd rv-text="user.address:city">

Teach Rivets.js how to observe and interact with different objects. Use . for plain object proterties and define a : adapter for Backbone model attributes. It's up to you. Adapters take care of observing and reading each key in a keypath.


Michael Richards is a Ruby/JavaScript developer, residing in beautiful Vancouver, British Columbia.