ecwyne / meteor-polymer-elements

Add polymer-elements to Meteor project
https://atmospherejs.com/ecwyne/polymer-elements
59 stars 14 forks source link

Meteor-Polymer

Add the magic of web components and Polymer (0.5.5) to Meteor!

About

This package adds core-elements and paper-elements from Polymer.

How to Install

meteor add ecwyne:polymer-elements

How to Use

All necessary web components and routing is done for you! All you have to do is use them! See below for how to import these elements and start using them!

Examples

Check out the wiki!

automatic_helper.html
  <!-- replace dashes with underscores for any element -->
    {{> paper_checkbox attrs=attributeObject}}
automatic_helper.js
  Template.automatic_helper.helpers({
    attributeObject = function(){return {checked: true}}
  })
link_helper.html
  <!--use a helper to import the link tags automatically -->
    {{> paper_checkbox_link}}
  <!-- Use the component as you normally would -->
    <paper-checkbox checked></paper-checkbox>
vanilla_polymer.html
  <!-- Add any <link rel="import" href="https://github.com/ecwyne/meteor-polymer-elements/blob/master/[path/to/element]"> tags you will use -->
    <link rel="import" href="https://github.com/ecwyne/meteor-polymer-elements/blob/master/bower_components/paper-checkbox/paper-checkbox.html">
  <!-- Use the component as you normally would -->
    <paper-checkbox checked></paper-checkbox>
block_helper.html
  {{#paper_button}}Submit!{{/paper_button}}