Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Latest commit

 

History

History
59 lines (42 loc) · 1.37 KB

Readme.md

File metadata and controls

59 lines (42 loc) · 1.37 KB

Build Status npm Coverage Status

kd.js

a collection of ui widgets and other nice things.

npm i kd.js

usage

var main = new kd.View;
main.appendToDomBody();

var input = new kd.InputView;
var form = new kd.View;

form.addSubView(input);
form.addSubView(new kd.ButtonView({
  title: 'i\'m a button. type in your name and click on me',
  callback: function () {
    alert('sup ' + input.getValue())
  }
}));

var tabs = new kd.TabView({
  hideHandleCloseIcons: true,
  paneData: [
    {
      title: 'tab1',
      partial: 'that\'s me, tab1'
    },
    {
      title: 'form',
      view: form
    }
  ]
});

main.addSubView(tabs);

example

Type make example to checkout some examples.

development

To watch lib and build standalone umd package into dist folder upon changes, type: make development-dist

If you want to recompile each coffee individually into build folder, type: make development

Since package.json exposes only build folder; if you are bundling kd.js with browserify, second method (along with a npm link) might be a better option.

license

mit