paper_elements 0.7.1+1

Paper elements

This package wraps the Polymer project's paper elements, enabling Dart developers to easily use the Polymer implementation of Google's material design UI widgets.

You can find out more about paper elements here:

The paper_elements package bundles all the paper elements into a single pub package, so that you can add paper_elements as a dependency in your pubspec. Installing npm and bower is not required.


This is an early access version of the paper elements. The elements are still changing on both the JavaScript and Dart sides.

Using elements

All elements live at the top level of the lib/ folder.

Import into HTML:

<link rel="import" href="packages/paper_elements/paper_input.html">

Import into Dart:

import 'package:paper_elements/paper_input.dart';


All examples are located in a separate repo,


  • Add textArea param to PaperAutogrowTextarea.update. This fixes


  • Update to new custom_element_apigen and use the polymer_interop package instead of the polymer package for most things.


  • Update to match js versions 0.5.5. * paper-checkbox * Updated to match material design spec. * Use border-color and background-color to style properly

      paper-checkbox::shadow #checkbox.checked {
        background-color: #4285f4;
        border-color: #4285f4;
    • paper-toggle-button
    • Updated to match material design spec.
    • No longer uses paper-radio-button and the styling api has changed. Please refer to API docs for the updated styling api.

    • paper-radio-button
    • To style properly, must now set border-color on an additional element:

      paper-radio-button[checked]::shadow #offRadio {border-color: #4285f4;}


  • Fix missing semicolon in paper-ripple.


  • Update constraint on web_components.


  • Add missing stub for core-resizable.


  • Increase polymer and custom_element_apigen lower bounds. Now takes advantage of @HtmlImport so manual html imports are no longer required to use the elements, just a dart import will work.


  • Cherry pick fixes in paper-input for breaking long words in mirror (paper-input@2f4c286 and paper-input@5ec201a)


  • Increase core-elements upper bound.


  • Moved examples to central repo and updated readme


  • Added some methods/properties from the polymer base class.
  • Added mixin support so elements that mixin CoreFocusable work as intended.


  • Add back value and committedValue to paper-input, fixes 66.


  • Updated to match JS version 0.5.1. New Element paper-spinner is a new element that provides a material design loading spinner. New Element paper-dropdown is a new material design styled dropdown. Breaking Change paper-input has had a lot of changes. Namely, it no longer supports the multiline property. There are two new elements which can be used to duplicate the old functionality, paper-input-decorator and paper-autogrow-textarea. Breaking Change paper-item removed icon, iconSrc, and label attributes. Use nested DOM for label content. Breaking Change* paper-shadow is a container instead of targeting another element. * Use setZ() to set the depth of the shadow instead of assigning the z

    • The z attribute now uses a one time binding.
    • Breaking Change paper-dialog was broken into two elements.
    • paper-dialog for a plain dialog.
    • paper-action-dialog for a dialog with scrollable body and buttons.


  • Updated to match JavaScript version 0.4.2. This includes some breaking changes in elements APIs. For example, PaperButton.raisedButton was renamed to PaperButton.raised.

  • removed unnecessary files (README from the paper element repos)


  • Updated to use polymer 0.15.1 (Dart interop support is loaded automatically now.)


  • Update paper_elements_config.yaml with the new deletion_patterns option. This deletes a lot of cruft code from bower update.


  • Update elements to the 0.4.1 JavaScript versions.
  • Breaking Change paper-dropdown was renamed paper-dropdown-menu.


  • Upgrade custom_element_apigen to a real dependency as its required in the wrappers.


  • Update all elements so they can be built from code using a normal factory constructor, such as new PaperInput(). It is still necessary however to include the html import for each element you wish to create this way.

  • Updated library name on each element to say paper_elements instead of core_elements.


  • Update all elements to the 0.4.0 js version.
  • NEW Added paper_dropdown element.
  • Removed paper_menu_button_overlay.
  • Upgraded polymer version constraint to >=0.14.0.


  • Upgraded polymer version constraint to >=0.13.0.
  • Upgraded core elements constraint to >=0.2.0+1.


  • Expanded polymer version constraint to <0.14.0.


  • Updated all elements to the 0.3.5 js version.


  • Removed unused html5lib dev dependency.


  • Updated all elements to the 0.3.4 js version.

1. Depend on it

Add this to your package's pubspec.yaml file:

  paper_elements: "^0.7.1+1"

2. Install it

You can install packages from the command line:

$ pub get

Alternatively, your editor might support pub. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:paper_elements/paper_action_dialog.dart';
import 'package:paper_elements/paper_autogrow_textarea.dart';
import 'package:paper_elements/paper_button.dart';
import 'package:paper_elements/paper_button_base.dart';
import 'package:paper_elements/paper_char_counter.dart';
import 'package:paper_elements/paper_checkbox.dart';
import 'package:paper_elements/paper_dialog.dart';
import 'package:paper_elements/paper_dialog_base.dart';
import 'package:paper_elements/paper_dialog_transition.dart';
import 'package:paper_elements/paper_dropdown.dart';
import 'package:paper_elements/paper_dropdown_menu.dart';
import 'package:paper_elements/paper_dropdown_transition.dart';
import 'package:paper_elements/paper_fab.dart';
import 'package:paper_elements/paper_icon_button.dart';
import 'package:paper_elements/paper_input.dart';
import 'package:paper_elements/paper_input_decorator.dart';
import 'package:paper_elements/paper_item.dart';
import 'package:paper_elements/paper_menu_button.dart';
import 'package:paper_elements/paper_progress.dart';
import 'package:paper_elements/paper_radio_button.dart';
import 'package:paper_elements/paper_radio_group.dart';
import 'package:paper_elements/paper_ripple.dart';
import 'package:paper_elements/paper_shadow.dart';
import 'package:paper_elements/paper_slider.dart';
import 'package:paper_elements/paper_spinner.dart';
import 'package:paper_elements/paper_tab.dart';
import 'package:paper_elements/paper_tabs.dart';
import 'package:paper_elements/paper_toast.dart';
import 'package:paper_elements/paper_toggle_button.dart';
import 'package:paper_elements/roboto.dart';
import 'package:paper_elements/sampler_scaffold.dart';


Paper elements for Dart


Email Polymer.dart Authors