Cape.JS Documentation

A lightweight JavaScript UI library based on virtual-dom

npm version Bower version

Cape.JS Documentation

A lightweight JavaScript UI library based on virtual-dom

What is Cape.JS?

Cape.JS is a lightweight JavaScript UI framework with following features:

  • Full stack: You can build single-page applications (SPAs) with Cape.JS.
  • Modular: You can place web widgets built by Cape.JS to your static web sites.
  • Virtual DOM: Cape.JS takes advantage of virtual-dom of Matt-Esch for high performance rendering.
  • Markup builder: The markup builder helps you to construct HTML DOM trees with its simple, easy to learn syntax.
  • Form manipulation: You can get or set the value of form fields without jQuery .
  • Data stores: Using data stores, you can build web applications with unidirectional data flow.
  • Resource agents and collection agents: Using resource agents and/or collection agents, you can perform REST requests to the web resources using Fetch API .
  • Router: You can define routes with a DSL (domain specific language) similar to that of Ruby on Rails.

The architecture and terminology of Cape.JS are strongly influenced by React , Riot and Ruby on Rails .


If you just want to use Cape.JS in your web site, insert the following snippet to the <head> section of your HTML files.

<script src="//"></script>

You can get the package for npm with following command:

$ npm install capejs

You can get the package for bower with following command:

$ bower install capejs

Notes on the Promise and Fetch API

In order to take advantage of the full capabilities of Cape.JS, you may have to install pollyfills for the Promise and Fetch API , because these technologies are only supported by some modern browsers (Firefox and Chrome).

If you want to support Microsoft Edge, Internet Explorer and Safari, you need to include these pollyfills into your application by adding the following lines to the <head> section of your HTML files.

<script src="//"></script>
<script src="//"></script>


Is it “Cape.JS”, “CapeJS”, or “capejs”?

The official name is Cape.JS. Its package name for npm and bower is capejs (without the dot).

At the very initial phase of development, we called it “CapeJS”, but we don’t use it anymore.

Is it production ready?

Yes, it is. We adopt Semantic Versioning for Cape.JS, and we have released the version 1.0.0.

Which browsers are supported?

We test Cape.JS on Microsoft Edge, Internet Explorer 11, Safari (7.1+) and the latest versions of Chrome and Firefox.

Note that we have no plan to support the Internet Explorer 8, 9, and 10.

How can I contribute?

The Cape.JS is an open source project. Everyone can help. See for details.


The logo of Cape.JS is created by Junya Suzuki .


“Cape.JS” and its logo are trademarks of Oiax Inc. All rights reserved.


Cape.JS is released under the MIT License .