Views for browser

npm install view-lite
26 downloads in the last week
54 downloads in the last month


View. Download compressed or uncompressed source.

  • Depends on elements-lite, router-lite and browser-history-lite.


View(name, element, parent, contentSelector)
  • name String - A name for a view.
  • element String or Function or DOM Node - View representation as DOM tree. String and Function will be transformed to DOM Node on first call.
  • parent String - Parent view name.
  • contentSelector String, optional - A selector to where a child Node will be attached.

How to use

// Define starting point
View("body", document.body)
// Create first simple view
View("home", ".home", "body")
// Create another view
View("work", ".work", "body")

// Start
View.default = "home"

// call manualy


Copyright (c) 2013 Lauri Rooden <>
The MIT License

npm loves you