Small, useful snippets/samples that show how to do things the Polymer way.
bower install
-
Fire up a web server in the root of this repo. For example:
python -m SimpleHTTPServer
See the contribution guide.
- Binding to a property
- Binding to a complex object
- Binding to a native HTML element
- Binding to a style
- Using 'bind' to create a single template instance
- Finding Shadow DOM elements
- Using a computed property
- Creating a one-time binding
- Extending a native HTML element
- Conditionally hiding an element
- Getting the iteration index when looping over a collection
- Looping over a collection using iterative templates
- Using conditional templates
- Using template repeat with a table row or an option
- Binding a boolean property to a checkbox
- Binding to a text input
- Binding to a textarea
- Selecting one item using radio buttons
- Selecting many items using checkboxes
- Selecting one item using the core-selector element
- Selecting many items using the core-selector element
- Implementing simple validation
- Observing property changes
- Observing changes to light DOM children
- Waching for changes to a nested object
- Creating an insertion point using the content tag
- Creating insertions using the select attribute
- Accessing the DOM inside a content tag
- Retrieving the insertion points for distributed nodes
- Defining styles inside a Polymer element
- Programmatically changing the styles of an element
- Using :host with a CSS selector
- Using :host with pseudo classes
- Using host-context to theme an element
- Applying styles by piercing Shadow DOM boundaries
- Styling distributed nodes
Snippets using Polymer core elements.