node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


Ribcage Button

A little view to use with ribcage-view that gives you a button.


  var Button = require('button')
  var button = new Button({
    label: 'Submit'
    , name: 'optional name'


<String> label Required

What the text of the button should be.

<Boolean> enabled

Should the button start in an enabled state? Defaults to true.

<String> icon

A class name of an icon to prepend to the button. Will be prepended as <i class="icon-{{icon}}></i>

<String> classes

The CSS classes to apply to the <button>. Defaults to 'btn'.

<String> name

Optional. Set a name for this button. Will be passed in select events

JS Methods


Enable the button.


Disable the button.


.on('action|select', view, name, null, label)

Triggered when the button is enabled and clicked. the select event is now deprecated, use action instead

  • view is the button view
  • name is the name option, if set
  • third argument will always be null because buttons can't have a value
  • label is the label option.


None yet. Should be in prova when implemented.


Test that this compiles with browserify -t hbsfy ribcage-button.js