Polymer prodives a lot of well built elements for you to use in your app.
Browse them in their Element Catalog.
Let's go through the workflow of using an element by including paper-input
(Documentation)
To Download an element there are two ways:
The convinient way is to use the command line using the bower install
command:
bower install --save PolymerElements/paper-input
Note: --save
adds the element as a dependency to the bower.json
of your app.
The other way is to add the selected element (paper-input
in this case) to your collection (in the Polymer Catalog) using "Add to Collection" in the navigation and download your collection using the star icon in the upper right corner.
This will generate a .zip file that contains the element and all of its dependencies. You can then copy the bower_components
folder inside the .zip/components to the root directory of your app.
To import the element you've just installed, import the corresponding .html
file:
<link rel="import" href="bower_components/paper-input/paper-input.html">
Now you can use paper-input
inside the document you imported it to:
<paper-input></paper-input>