Blog

Slick Modular Web Components with Polymer

As a primarily back-end focused developer, I admit that sometimes I find user interface work pretty tedious, especially when I can’t get something to look or behave the way I feel it should. On large projects, stylesheets can get cluttered and I have a bad habit of throwing everything into a single “site.css” file that gets loaded into every page. I wind up with dozens of CSS classes and identifiers to make sure that each component of my website has its own specialized styling and doesn’t accidentally inherit the styles of something else. Usually, the look and feel of my site is at the mercy of whatever CSS library I’m using.

Fortunately, I’ve discovered a relatively new framework that takes a lot of headache out of front-end design. The framework is called Polymer: a JavaScript framework from Google that takes Web Components to a new level. Here are three features of Polymer that make it great:

1. Hundreds of plug-and-play elements
The Polymer Element Catalog has many useful open source elements that can be directly included in your source code once the Polymer framework has been installed, ranging from responsive and animated text fields and buttons, to elements which help you manage AJAX requests. The elements have declarative syntax, meaning that once you’ve included them in your project, they can be inserted directly into your HTML files just as easily as any of the native HTML elements. You can combine these elements with data bindings to pass values between components and validate forms without writing any JavaScript.

2. Custom elements
If you can’t find the right element to suit your needs, Polymer gives you the tools to build your own elements. Elements have encapsulated style, form and function, meaning you can detail specifically how an element is to look and behave. Polymer elements contain methods and properties that can be called from other elements in the DOM. This makes your components feel more like extensible objects, rather than simple UI elements.

3. Class-like inheritance
If you have a shared functionality or style among a number of elements, you definitely don’t want to repeat that code. Fortunately, Polymer allows you to inherit multiple styles and behaviors into elements. Instead of re-writing a particular function for each of your elements, you can instead write that function as a behavior, and have each element extend it. Similarly, if you wish for a family of custom elements to use the same CSS properties, you can import one or many custom style elements. These elements enable easy theming, allowing you to change the appearance of your application simply by swapping style elements.

For more information on Polymer, check out their Polycasts on YouTube as well as their Polymer Starter Kit.

Related Blogs
See All Blogs
Abstract tech image
Blog
Apr 15, 2025

Analysis Paralysis in AI Adoption

Learn why endless discussions and the relentless pursuit of flawless data are actually costing you valuable time, insights, and competitive advantage – just like it did for giants like Kodak and Blockbuster.

Read More
Product team at a meeting
Blog
Apr 4, 2025

Don’t Take Product Out of the Equation: How to Nail Your AI Implementation

AI isn't just about the technology, it's about solving real problems and delivering real value. One way to do that is to keep product at the forefront during your AI implementation. Learn more about why having a product-first mindset is so important in this article by Principal Product Strategist Heather Harris.

Read More
Female financial analyst at a computer
Blog
Apr 3, 2025

Navigating AI in Banking and Financial Services: A Risk-Based Rebellion for Leaders

Every shiny AI use case in regulated industries has a shadow: governance, compliance, model risk, ethics, bias, explainability, cyberattack vectors and more. It's not that organizations and leaders don’t want AI, it’s that they’re paralyzed by the political, regulatory, and operational realities of deploying it. Sparq's Chief Technology Officer Derek Perry and VP, BFSI Industry Leader Rob Murray argue we need to change that. Check out this article to learn how to actually ship production AI use cases in regulated environments.

Read More
Product development team working
Blog
Apr 2, 2025

Five Important Questions to Ask Before Starting Your AI Implementation

Creating a lasting impact with AI requires more than just technical output. In this article by Principal Product Strategist Heather Harris, learn five questions to ask before starting an AI implementation so it can deliver long-term business value.

Read More
See All Blogs
noun-arrow-2025160 copy 2
noun-arrow-2025160 copy 2
See All Blogs