The Polymer library is in maintenance mode. For new development, we recommend Lit.

You're viewing an older version of the Polymer library documentation. Please see Polymer 3.0 for the latest.

The Polymer App Toolbox is a collection of components, tools and templates for building Progressive Web Apps with Polymer.

Follow the instructions below to install, build, and deploy a project using an App Toolbox template in less than 15 minutes.

Polymer CLI is an all-in-one command line tool for Polymer projects. In this tutorial you use Polymer CLI to initialize, serve, and build your project. You can also use it for linting and testing, but this tutorial won't cover those topics.

Polymer CLI requires Node.js, npm, Git and Bower. For full installation instructions, see the Polymer CLI documentation.

To install Polymer CLI:

npm install -g polymer-cli
  1. Create a new project folder to start from.

     mkdir my-app
     cd my-app
  2. Initialize your project with an app template.

     polymer init

    Press the down arrow until polymer-2-starter-kit is highlighted and press the enter / return key to select.

The App Toolbox templates do not require any build steps to get started developing. You can serve the application using the Polymer CLI, and file changes you make will be immediately visible by refreshing your browser.

To serve your project:

polymer serve --open

The diagram below is a brief summary of the files and directories within the project.

bower.json             # bower configuration
bower_components/      # app dependencies
index.html             # main entry point into your app
manifest.json          # app manifest configuration
package.json           # npm metadata file
polymer.json           # Polymer CLI configuration
service-worker.js      # auto-generated service worker
src/                   # app-specific elements
  my-app.html            # top-level element
  my-icons.html          # app icons
  my-view1.html          # sample views or "pages"
  my-view404.html        # sample 404 page
  shared-styles.html     # sample shared styles
sw-precache-config.js  # service worker pre-cache configuration
test/                  # unit tests

Your app is now up and running locally. Next, learn how to add a page to your app.

Next step: Create a page