Skip to content

Latest commit

 

History

History
87 lines (38 loc) · 1.29 KB

old-readme.md

File metadata and controls

87 lines (38 loc) · 1.29 KB

This doc is outdated, new version pending.

Crater UI Library for Meteor.js

This is a small, but growing library of common UI elements that can be reused acrosss Meteor applications.

Features:

  • Easy reusable forms
    • Nested attributes
    • Image element
  • Modals and overlays
  • Small useful elements
    • Two-step safety button
    • Toggle switch

API

Base

Crater.go

Crater.go(templateInstance)

Use within Template.x.rendered function to initialize Crater UI elements used within tempalte instance.

Example:

Template.options.rendered = function() {
  Crater.go(this);
}

Crater.events

Crater.events(templateInstance, map)

Similar to Template.x.events. Use within Template.x.rendered function to pass callbacks to Crater events.

Example:

Template.options.rendered = function() {
  Crater.go(this);
  Crater.events(this, {

    'toggle .optionSwitch': function(e) {
      ...
    },

  });

}