SlideShare a Scribd company logo
Web Components
Diwakar Cherukumilli
Oswald Campesato
What are Web Components?
Web Components are a set of emerging standards that change the way web apps
are developed by reusing components in a much more efficient way
“A web app is a large collection of web components composed of many subelements,
known as custom elements” - Eric Bidelman
Why Web Components?
HTML at the beginning of the web
Small set of tags like:
● <select>
● <form>
● ….
These elements provided:
● Declarative
● Encapsulation
● Default UI
● Events
...
<select>
<option>One</option>
<option disabled>Two</option>
<option disabled>Three</option>
<option>Four</option>
<li>Five</li>
</select>
…
● Declarative
● Encapsulated
● Default UI
● NO JS :)
Modern Web apps without Web
Components
● Copy & paste chunks of HTML from CSS
libraries like Bootstrap
● All sorts of Javascript frameworks and plugins
● Reusing components from different frameworks
in the same page is not possible
○ Pages end up with bloated CSS and/or
Javascript
● Difficult to maintain
GMail code (in chrome developer tools)
Building a modern chart
Building a modern chart without web components
<head>
<!-- Load the google JS library to use the google visualization API -->
<script type=”text/javascript” src=”https://www.google.com/jsapi”></script>
</head>
<body>
<!-- Add the div tag as a placeholder for the chart -->
<div id=”char_div” style=”width:400; height: 300”></div>
</body>
Building a modern chart without web components
<!-- Using javascript -->
<!-- Load the visualization API -->
google.load(‘visualization’, ‘1.0’, {‘packages’: [‘corechart’]});
<!-- Set values and options on load callback -->
google.setOnLoadCallback(function() {
var data = new google.visualization.arrayToDataTable([[“Day”, “A”, “B”, “C”], [“Mon”, 20, 45, 28],
[“Tue”, 31, 66, 38], [“Wed”, 50, 80, 55], [“Thu”, 77, 50, 77], [“Fri”, 68, 15, 66]]);
var options =
{“seriesType”: “bars”, “series”: {“2”: {“type”: “line”}},
“width”: 400,
“height”: 300
};
<!-- Specify the dom element for the chart and draw it-->
var div = document.getElementById(‘chart_div’);
var chart = new google.visualization.ComboChart(div);
chart.draw(data, options);
});
Building a modern chart with web components
<head>
<!-- Load polyfill for cross browser support -->
<script src=”js/webcomponentjs.js”></script>
<!-- Import the google chart component -->
<link rel=”import” href=”components/google-chart.html”>
</head>
<body>
<!-- Add google chart tag and fill in the attributes -->
<google-chart
type=”combo”
height=”300px” width=”400px”
options=”{‘seriesType’: ‘bars’, ‘series’: {‘2’: {‘type’: ‘line’}}}”
data=”[[‘Day’, ‘A’, ‘B’, ‘C’], [‘Mon’, 20, 45, 28], [‘Tue’, 31, 66, 38], [‘Wed’, 50, 80, 55], [‘Thu’, 77, 50, 77], [‘Fri’, 68, 15, 66]]”>
</google-chart>
</body>
Declarative approach (with web
components)
<google-chart
type=”combo”
height=”300px”
width=”400px”
options=”{‘seriesType’: ‘bars’, ‘series’: {‘2’: {‘type’:
‘line’}}}”
data=”[[‘Day’, ‘A’, ‘B’, ‘C’], [‘Mon’, 20, 45, 28], [‘Tue’,
31, 66, 38], [‘Wed’, 50, 80, 55], [‘Thu’, 77, 50, 77], [‘Fri’,
68, 15, 66]]”>
</google-chart>
<!-- Easier to use -->
<!-- No need to know the underlying JS
API and CSS -->
Imperative Approach (without web
components)
google.load(‘visualization’, ‘1.0’, {‘packages’: [‘corechart’]});
google.setOnLoadCallback(function() {
var data = new google.visualization.
arrayToDataTable([[“Day”, “A”, “B”, “C”], [“Mon”, 20, 45,
28], [“Tue”, 31, 66, 38], [“Wed”, 50, 80, 55], [“Thu”, 77, 50,
77], [“Fri”, 68, 15, 66]]);
var options =
{“seriesType”: “bars”, “series”: {“2”: {“type”:
“line”}},
“width”: 400,
“height”: 300
};
var div = document.getElementById(‘chart_div’);
var chart = new google.visualization.ComboChart
(div);
chart.draw(data, options);
});
Scoped
Web components
● All mark up and CSS are scoped to the element
● Styles scoped to the element will not leak out to the parent
● Parent can’t style the web component accidentally
● Imported web components will not harm any part of your web page
Non Web Component based libraries
● Existing libraries that have same classes and id can cause styles to leak
Reusable
● Scoped and decoupled with the other parts of your web app
● Use same component in the other parts of your web app
● Use the component in another web app
● Publish your component as open source so that others can use it
Isolation
● Decouple development of web components from the rest of the web app as
they are scoped
● Maintenance of the web component is much easier due to isolation
Web Components is an umbrella term for four different
W3C specifications
● Custom Elements lets you define your own HTML tags
● HTML Templates enables you to define blocks of markup with the ability to
inject dynamic content into
● Shadow DOM gives you the ability to scope markup and styles in a separate
DOM tree
● HTML Imports provides a way to include and reuse HTML documents in other
HTML documents
Vanilla Web Component (svcc-component.html)
<template>
<p>This is svcc-component’s SHADOW DOM</p>
</template>
<script>
// 1. Register a custom element
var XElement = document.registerElement(‘svcc-component’, {
prototype: Object.create(HTMLElement.prototype, {
createCallback: {
value: function(){
// 2. Associate Shadow dom onto it
var root = this.createShadowRoot();
//3. Use templates to provide the contents of the shadow dom
var template = thisDoc.querySelector(‘#template’);
var content = thisDoc.importNode(template.content, true);
root.appendChild(content);
}
}
}
});
</script>
index.html
<html>
<head>
<!-- 4. Use HTML import to import the component-->
<link rel=”import” href=”svcc-component.html>
</head>
<body>
<svcc-component></svcc-component>
</body>
</html>
Polymer for buiding Web Components
Polymer lets you build
● encapsulated,
● re-usable elements
● that work just like HTML elements,
● to use in building web applications.
Polymer in 1 minute
/** * A not-very-useful inline element */
Polymer({
is: 'my-element'
});
Add markup to your element
<!-- define the markup that your element will use -->
<dom-module id="my-simple-namecard">
<template>
<div>
Hi! My name is <span>Jane</span>
</div>
</template>
<script>
Polymer({
is: 'my-simple-namecard'
});
</script>
</dom-module>
Configure properties on your element
// Create an element that takes a property
Polymer({
is: 'my-property-namecard',
properties: {
myName: {
type: String
}
},
ready: function() {
this.textContent = 'Hi! My name is ' + this.myName;
}
});
<!-- using the element -->
<my-property-namecard my-name="Jim"></my-property-namecard>
Hi! My name is Jim.
Bind data into your element using the
familiar mustache-syntax
<!-- define markup with bindings -->
<dom-module id="my-bound-namecard">
<template>
<div>
Hi! My name is <span>{{myName}}</span>
</div>
</template>
<script>
Polymer({
is: 'my-bound-namecard',
properties: {
myName: {
type: String
}
}
});
</script>
Hi! My name is Josh.
<!-- using the element -->
<my-bound-namecard my-name="Josh"></my-bound-namecard>
Bind data into your element using the
familiar mustache-syntax
<!-- define markup with bindings -->
<dom-module id="my-bound-namecard">
<template>
<div>
Hi! My name is <span>{{myName}}</span>
</div>
</template>
<script>
Polymer({
is: 'my-bound-namecard',
properties: {
myName: {
type: String
}
}
});
</script>
Hi! My name is Josh.
<!-- using the element -->
<my-bound-namecard my-name="Josh"></my-bound-namecard>
Style the internals of your element, without
the style leaking out
<!-- add style to your element -->
<dom-module id="my-styled-namecard">
<template>
<style>
/* This would be crazy in non webcomponents. */
span {font-weight: bold;}
</style>
<div>Hi! My name is <span>{{myName}}</span></div>
</template>
<script>
Polymer({
is: 'my-styled-namecard',
properties: {
myName: { type: String}
}
});
Hi! My name is Jesse.
<!-- using the element -->
<my-styled-namecard my-name="Jesse"></my-styled-namecard>
References...
Polymer - Chrome Dev Summit 2013 (Eric Bidelman)
Why Web Components (Zeno Rocha & Addy Osmani)?
DevBytes: Web Components - Overview (Eiji Katamura)
Polymer Github page (https://github.com/Polymer/polymer)

More Related Content

PDF
Levent-Gurses' Introduction to Web Components & Polymer
PDF
Modern Web Application Development Workflow - EclipseCon Europe 2014
PDF
AngularJS 101 - Everything you need to know to get started
PDF
Booting up with polymer
PDF
Booting up with polymer
PDF
Web Components & Polymer 1.0 (Webinale Berlin)
PPTX
Google Polymer Introduction
PDF
Web Components and Modular CSS
Levent-Gurses' Introduction to Web Components & Polymer
Modern Web Application Development Workflow - EclipseCon Europe 2014
AngularJS 101 - Everything you need to know to get started
Booting up with polymer
Booting up with polymer
Web Components & Polymer 1.0 (Webinale Berlin)
Google Polymer Introduction
Web Components and Modular CSS

What's hot (20)

PDF
Web Components
PPTX
ME vs WEB - AngularJS Fundamentals
PDF
Web Components v1
PPTX
Google Developer Group(GDG) DevFest Event 2012 Android talk
PDF
Introduction to Web Components
PDF
Polymer vs other libraries (Devfest Ukraine 2015)
PPTX
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
PPTX
Angular js presentation at Datacom
PPTX
Step by Step - AngularJS
PDF
Angularjs architecture
PPTX
Angular js 1.3 basic tutorial
PDF
Building a Secure App with Google Polymer and Java / Spring
PDF
AngularJS: an introduction
PPTX
Getting Started with Angular JS
PDF
Introduction of angular js
PDF
Web Components Everywhere
PDF
OpenCms Days 2015 Modern templates with nested containers
PDF
Angular js
PPTX
Angular View Encapsulation
PDF
Unlock the next era of UI design with Polymer
Web Components
ME vs WEB - AngularJS Fundamentals
Web Components v1
Google Developer Group(GDG) DevFest Event 2012 Android talk
Introduction to Web Components
Polymer vs other libraries (Devfest Ukraine 2015)
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Angular js presentation at Datacom
Step by Step - AngularJS
Angularjs architecture
Angular js 1.3 basic tutorial
Building a Secure App with Google Polymer and Java / Spring
AngularJS: an introduction
Getting Started with Angular JS
Introduction of angular js
Web Components Everywhere
OpenCms Days 2015 Modern templates with nested containers
Angular js
Angular View Encapsulation
Unlock the next era of UI design with Polymer
Ad

Viewers also liked (17)

PPT
Red Hat - Sarangan Rangachari
PDF
Drive It Home: A Roadmap for Today's Data-Driven Culture
PPTX
DisrupTech - Robin Bloor (2)
PPTX
WebAction-Sami Abkay
PDF
Nava1
PDF
แบบสำรวจ
DOCX
CV-MURUGAN PARAMASIVAM
PPTX
IT used by terrorists
PDF
The Postulate of Human Ecology
PDF
The Maturity Model: Taking the Growing Pains Out of Hadoop
PPTX
Humanitarianism and volunteerism
PDF
Big Data Refinery: Distilling Value for User-Driven Analytics
PDF
Understanding What’s Possible: Getting Business Value from Big Data Quickly
PDF
The Great Lakes: How to Approach a Big Data Implementation
PPTX
Anthropometry presentation on height and weight measurement
PPT
Ford presentation
PDF
What is Bitcoin? How Bitcoin works in under 5 minutes.
Red Hat - Sarangan Rangachari
Drive It Home: A Roadmap for Today's Data-Driven Culture
DisrupTech - Robin Bloor (2)
WebAction-Sami Abkay
Nava1
แบบสำรวจ
CV-MURUGAN PARAMASIVAM
IT used by terrorists
The Postulate of Human Ecology
The Maturity Model: Taking the Growing Pains Out of Hadoop
Humanitarianism and volunteerism
Big Data Refinery: Distilling Value for User-Driven Analytics
Understanding What’s Possible: Getting Business Value from Big Data Quickly
The Great Lakes: How to Approach a Big Data Implementation
Anthropometry presentation on height and weight measurement
Ford presentation
What is Bitcoin? How Bitcoin works in under 5 minutes.
Ad

Similar to Web components - An Introduction (20)

PDF
Web components are the future of the web - Take advantage of new web technolo...
PPTX
Web component
PPTX
Web Components: The Future of Web Development is Here
PPTX
Web Components: The Future of Web Development is Here
PDF
Web component driven development
PDF
2014 03-25 - GDG Nantes - Web Components avec Polymer
PPTX
Web Components
PDF
Tech talk polymer
PPTX
Introduction to Web Components & Polymer Workshop - U of I WebCon
PDF
Devoxx France - Web Components, Polymer et Material Design
PPTX
An Introduction to Web Components
PPTX
Web Components
PDF
The Web Components interoperability challenge - Horacio Gonzalez - Codemotion...
PDF
Introduction to Web Components & Polymer Workshop - JS Interactive
PDF
HTML5와 오픈소스 기반의 Web Components 기술
PPTX
Web components. Compose the web.
PDF
Web components the future is here
PPTX
Web Components: Introduction and Practical Use Cases
PDF
Introduction to Polymer and Firebase - Simon Gauvin
PDF
Real World Web components
Web components are the future of the web - Take advantage of new web technolo...
Web component
Web Components: The Future of Web Development is Here
Web Components: The Future of Web Development is Here
Web component driven development
2014 03-25 - GDG Nantes - Web Components avec Polymer
Web Components
Tech talk polymer
Introduction to Web Components & Polymer Workshop - U of I WebCon
Devoxx France - Web Components, Polymer et Material Design
An Introduction to Web Components
Web Components
The Web Components interoperability challenge - Horacio Gonzalez - Codemotion...
Introduction to Web Components & Polymer Workshop - JS Interactive
HTML5와 오픈소스 기반의 Web Components 기술
Web components. Compose the web.
Web components the future is here
Web Components: Introduction and Practical Use Cases
Introduction to Polymer and Firebase - Simon Gauvin
Real World Web components

Recently uploaded (20)

PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
ai tools demonstartion for schools and inter college
PPTX
Introduction to Artificial Intelligence
PDF
System and Network Administration Chapter 2
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
top salesforce developer skills in 2025.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
ai tools demonstartion for schools and inter college
Introduction to Artificial Intelligence
System and Network Administration Chapter 2
PTS Company Brochure 2025 (1).pdf.......
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How to Migrate SBCGlobal Email to Yahoo Easily
Which alternative to Crystal Reports is best for small or large businesses.pdf
Design an Analysis of Algorithms II-SECS-1021-03
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Navsoft: AI-Powered Business Solutions & Custom Software Development
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
top salesforce developer skills in 2025.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
How to Choose the Right IT Partner for Your Business in Malaysia

Web components - An Introduction

  • 2. What are Web Components? Web Components are a set of emerging standards that change the way web apps are developed by reusing components in a much more efficient way “A web app is a large collection of web components composed of many subelements, known as custom elements” - Eric Bidelman
  • 3. Why Web Components? HTML at the beginning of the web Small set of tags like: ● <select> ● <form> ● …. These elements provided: ● Declarative ● Encapsulation ● Default UI ● Events
  • 5. Modern Web apps without Web Components ● Copy & paste chunks of HTML from CSS libraries like Bootstrap ● All sorts of Javascript frameworks and plugins ● Reusing components from different frameworks in the same page is not possible ○ Pages end up with bloated CSS and/or Javascript ● Difficult to maintain GMail code (in chrome developer tools)
  • 7. Building a modern chart without web components <head> <!-- Load the google JS library to use the google visualization API --> <script type=”text/javascript” src=”https://www.google.com/jsapi”></script> </head> <body> <!-- Add the div tag as a placeholder for the chart --> <div id=”char_div” style=”width:400; height: 300”></div> </body>
  • 8. Building a modern chart without web components <!-- Using javascript --> <!-- Load the visualization API --> google.load(‘visualization’, ‘1.0’, {‘packages’: [‘corechart’]}); <!-- Set values and options on load callback --> google.setOnLoadCallback(function() { var data = new google.visualization.arrayToDataTable([[“Day”, “A”, “B”, “C”], [“Mon”, 20, 45, 28], [“Tue”, 31, 66, 38], [“Wed”, 50, 80, 55], [“Thu”, 77, 50, 77], [“Fri”, 68, 15, 66]]); var options = {“seriesType”: “bars”, “series”: {“2”: {“type”: “line”}}, “width”: 400, “height”: 300 }; <!-- Specify the dom element for the chart and draw it--> var div = document.getElementById(‘chart_div’); var chart = new google.visualization.ComboChart(div); chart.draw(data, options); });
  • 9. Building a modern chart with web components <head> <!-- Load polyfill for cross browser support --> <script src=”js/webcomponentjs.js”></script> <!-- Import the google chart component --> <link rel=”import” href=”components/google-chart.html”> </head> <body> <!-- Add google chart tag and fill in the attributes --> <google-chart type=”combo” height=”300px” width=”400px” options=”{‘seriesType’: ‘bars’, ‘series’: {‘2’: {‘type’: ‘line’}}}” data=”[[‘Day’, ‘A’, ‘B’, ‘C’], [‘Mon’, 20, 45, 28], [‘Tue’, 31, 66, 38], [‘Wed’, 50, 80, 55], [‘Thu’, 77, 50, 77], [‘Fri’, 68, 15, 66]]”> </google-chart> </body>
  • 10. Declarative approach (with web components) <google-chart type=”combo” height=”300px” width=”400px” options=”{‘seriesType’: ‘bars’, ‘series’: {‘2’: {‘type’: ‘line’}}}” data=”[[‘Day’, ‘A’, ‘B’, ‘C’], [‘Mon’, 20, 45, 28], [‘Tue’, 31, 66, 38], [‘Wed’, 50, 80, 55], [‘Thu’, 77, 50, 77], [‘Fri’, 68, 15, 66]]”> </google-chart> <!-- Easier to use --> <!-- No need to know the underlying JS API and CSS --> Imperative Approach (without web components) google.load(‘visualization’, ‘1.0’, {‘packages’: [‘corechart’]}); google.setOnLoadCallback(function() { var data = new google.visualization. arrayToDataTable([[“Day”, “A”, “B”, “C”], [“Mon”, 20, 45, 28], [“Tue”, 31, 66, 38], [“Wed”, 50, 80, 55], [“Thu”, 77, 50, 77], [“Fri”, 68, 15, 66]]); var options = {“seriesType”: “bars”, “series”: {“2”: {“type”: “line”}}, “width”: 400, “height”: 300 }; var div = document.getElementById(‘chart_div’); var chart = new google.visualization.ComboChart (div); chart.draw(data, options); });
  • 11. Scoped Web components ● All mark up and CSS are scoped to the element ● Styles scoped to the element will not leak out to the parent ● Parent can’t style the web component accidentally ● Imported web components will not harm any part of your web page Non Web Component based libraries ● Existing libraries that have same classes and id can cause styles to leak
  • 12. Reusable ● Scoped and decoupled with the other parts of your web app ● Use same component in the other parts of your web app ● Use the component in another web app ● Publish your component as open source so that others can use it
  • 13. Isolation ● Decouple development of web components from the rest of the web app as they are scoped ● Maintenance of the web component is much easier due to isolation
  • 14. Web Components is an umbrella term for four different W3C specifications ● Custom Elements lets you define your own HTML tags ● HTML Templates enables you to define blocks of markup with the ability to inject dynamic content into ● Shadow DOM gives you the ability to scope markup and styles in a separate DOM tree ● HTML Imports provides a way to include and reuse HTML documents in other HTML documents
  • 15. Vanilla Web Component (svcc-component.html) <template> <p>This is svcc-component’s SHADOW DOM</p> </template> <script> // 1. Register a custom element var XElement = document.registerElement(‘svcc-component’, { prototype: Object.create(HTMLElement.prototype, { createCallback: { value: function(){ // 2. Associate Shadow dom onto it var root = this.createShadowRoot(); //3. Use templates to provide the contents of the shadow dom var template = thisDoc.querySelector(‘#template’); var content = thisDoc.importNode(template.content, true); root.appendChild(content); } } } }); </script> index.html <html> <head> <!-- 4. Use HTML import to import the component--> <link rel=”import” href=”svcc-component.html> </head> <body> <svcc-component></svcc-component> </body> </html>
  • 16. Polymer for buiding Web Components Polymer lets you build ● encapsulated, ● re-usable elements ● that work just like HTML elements, ● to use in building web applications.
  • 17. Polymer in 1 minute /** * A not-very-useful inline element */ Polymer({ is: 'my-element' });
  • 18. Add markup to your element <!-- define the markup that your element will use --> <dom-module id="my-simple-namecard"> <template> <div> Hi! My name is <span>Jane</span> </div> </template> <script> Polymer({ is: 'my-simple-namecard' }); </script> </dom-module>
  • 19. Configure properties on your element // Create an element that takes a property Polymer({ is: 'my-property-namecard', properties: { myName: { type: String } }, ready: function() { this.textContent = 'Hi! My name is ' + this.myName; } }); <!-- using the element --> <my-property-namecard my-name="Jim"></my-property-namecard> Hi! My name is Jim.
  • 20. Bind data into your element using the familiar mustache-syntax <!-- define markup with bindings --> <dom-module id="my-bound-namecard"> <template> <div> Hi! My name is <span>{{myName}}</span> </div> </template> <script> Polymer({ is: 'my-bound-namecard', properties: { myName: { type: String } } }); </script> Hi! My name is Josh. <!-- using the element --> <my-bound-namecard my-name="Josh"></my-bound-namecard>
  • 21. Bind data into your element using the familiar mustache-syntax <!-- define markup with bindings --> <dom-module id="my-bound-namecard"> <template> <div> Hi! My name is <span>{{myName}}</span> </div> </template> <script> Polymer({ is: 'my-bound-namecard', properties: { myName: { type: String } } }); </script> Hi! My name is Josh. <!-- using the element --> <my-bound-namecard my-name="Josh"></my-bound-namecard>
  • 22. Style the internals of your element, without the style leaking out <!-- add style to your element --> <dom-module id="my-styled-namecard"> <template> <style> /* This would be crazy in non webcomponents. */ span {font-weight: bold;} </style> <div>Hi! My name is <span>{{myName}}</span></div> </template> <script> Polymer({ is: 'my-styled-namecard', properties: { myName: { type: String} } }); Hi! My name is Jesse. <!-- using the element --> <my-styled-namecard my-name="Jesse"></my-styled-namecard>
  • 23. References... Polymer - Chrome Dev Summit 2013 (Eric Bidelman) Why Web Components (Zeno Rocha & Addy Osmani)? DevBytes: Web Components - Overview (Eiji Katamura) Polymer Github page (https://github.com/Polymer/polymer)