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.

If you're familiar with Polymer and just want to get started with the new release, you're in the right place! If you'd like an introduction to the Polymer project and web components:

Polymer is distributed via the Bower package manager.

To create an application template and install Polymer automatically, you can use the Polymer CLI.

To start a project from scratch, you can install Polymer with Bower.

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

  1. Install the Polymer CLI.

    npm install -g polymer-cli
  2. Create a test folder for Polymer 2.0, and switch to it.

    mkdir polymer-20-test
    cd polymer-20-test
  3. Initialize your project.

    polymer init
  4. Select polymer-2-application.

  5. Serve your project.

    polymer serve
  1. Install Bower.

    npm install -g bower
  2. Install the Polymer CLI

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

    npm install -g polymer-cli
  3. Install the latest Polymer 2.0 release from bower

    bower install Polymer/polymer#^2.0.0
  4. Create a test index.html file, and add the following in the <head> tag:

  • <script src="/bower_components/webcomponentsjs/webcomponents-loader.js"></script> to load the polyfills
  • <link rel="import" href="/bower_components/polymer/polymer.html"> to import Polymer
  1. Import and use whichever elements you’d like.

  2. Serve your project.

    polymer serve

For information on building your project for production, see the documentation on building Polymer applications for production.