VOOZH about

URL: https://thenewstack.io/how-web-components-are-used-at-github-and-salesforce/

⇱ How Web Components Are Used at GitHub and Salesforce - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2021-02-22 10:00:15
How Web Components Are Used at GitHub and Salesforce
profile,
Frontend Development / Software Development

How Web Components Are Used at GitHub and Salesforce

Web components aren’t as well documented as React components, but GitHub and Salesforce have both implemented this emerging standard.
Feb 22nd, 2021 10:00am by Richard MacManus
👁 Featued image for: How Web Components Are Used at GitHub and Salesforce
Feature image via Pixabay.
Web Components is an emerging web standard that allows developers to create reusable custom elements for their web pages and apps. Having only recently gained support in the leading browsers, the usage of web components isn’t as well documented as (for example) React components — which have received a lot of attention in recent years. For that reason, I decided to speak with a couple of companies that have implemented web components: GitHub and Salesforce.

Web Components vs. React

Richard MacManus
Richard is senior editor at The New Stack and writes a weekly column about web and application development trends. Previously he founded ReadWriteWeb in 2003 and built it into one of the world’s most influential technology news and analysis sites.
First, let’s address the elephant in the room: why use web components when you can use one of the popular frontend frameworks instead? The community website WebComponents.org defines web components as “a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps.” One of its use cases is to create reusable UI elements; although many web developers currently use React (or a similar JavaScript library or framework) for that purpose. The key difference is that web components are portable, since they are based on HTML, whereas React components can only be used in a React environment. It’s fair to say that not all developers see the value of web components. When Google Senior Staff Engineer Alex Russell (one of the founding developers of this technology) posted on Twitter that web components are now used by “12% of pages loaded in Chrome,” he got a range of positive and negative responses. This snippet from the discussion is illustrative of why frameworks adherents aren’t necessarily convinced yet about web components: 👁 Image
Clearly, frontend frameworks are all the rage currently. But that makes it even more interesting to explore why some companies have decided not to use them. GitHub is one of those companies.

GitHub and Web Components

GitHub now has about 50 web components, tweeted GitHub Senior Application Engineer Keith Cirkel. “Don’t see us slowing down either,” he added. “GitHub has never used a framework like Angular, Backbone or React,” Cirkel told me when I reached out for more information. GitHub had been using the JavaScript library jQuery, he explained, but eventually they replaced it with “native web platform features — which includes web components.” “Web components aren’t necessarily replacing jQuery for us though,” he continued, “they’re just a natural consequence of regular modernisations of the codebase. Web components bring to us the ‘component model’ which is a software paradigm that is maybe popularised the most from React.” The ability to componentize software is a well accepted programming norm. But while JavaScript itself has a component model, the wider web platform (HTML, CSS and JavaScript) hasn’t traditionally had one. This was the motivation behind web components, created within Google and which continues to be worked on today by its Chrome development team. I asked Cirkel for some examples of web components in action at GitHub. He highlighted three. “Any UI with tabs uses Tab Container Element, dialog boxes use Details Dialog Element, anything displaying relative time uses one of the Time Elements — which are our oldest elements dating back to 2014 or so.” Here’s the HTML code used for the tab component:
<tab-container>
 <div role="tablist">
 <button type="button" role="tab" aria-selected="true">Tab one</button>
 <button type="button" role="tab" tabindex="-1">Tab two</button>
 <button type="button" role="tab" tabindex="-1">Tab three</button>
 </div>
 <div role="tabpanel">
 Panel 1
 </div>
 <div role="tabpanel" hidden>
 Panel 2
 </div>
 <div role="tabpanel" hidden>
 Panel 3
 </div>
</tab-container>
You can of course create a tabs component with React too, so developers have many choices as to how they do this. GitHub’s choice, though, was to rely on web standards — in order to avoid technical debt, speed up page load, and more.

A Note on Frameworks

Even though GitHub has opted to use web components rather than a frontend framework, it doesn’t entirely avoid the use of frameworks. “GitHub still uses Ruby on Rails for the server side framework,” said Cirkel, “we just have no client side JS framework. We progressively enhance areas of the page with web components.” Cirkel also noted that he isn’t against the use of frontend frameworks; he thinks they’re “useful for applications like SPAs which require complex UI.” But since GitHub isn’t an SPA (it has many web pages), he thinks web components are “totally capable of serving the same needs.” Web components also scale well, Cirkel assured me. “They provide good organisation, isolation, and encapsulation; which are all hallmarks of a technology that scales well.”

Salesforce’s Lightning Web Components

Another large scale internet company using web components is Salesforce. To find out more, I got in touch with Greg Whitworth, who leads the Lightning Web Components [LWC] team at Salesforce. Previously, Whitworth had worked on the Microsoft team that built its modern browser, Edge. “LWC was designed around the idea of creating the thinnest abstraction layer on top of the Web Components APIs,” explained Whitworth. “This abstraction layer is highly opinionated to match with Salesforce platform restrictions and development philosophy. In the long run, the goal is to shrink LWC as much as possible to be able to rely more and more on the web platform native APIs.” He noted that Salesforce actively participates in web standards groups, including for web components, “to ensure that the web platform moves in the direction that supports our customer’s use cases.” LWC was used to build the so-called Lightning Experience version of the Salesforce CRM, an upgrade on the “Classic Salesforce” interface. “Every base component [of the Lightning Experience] is built on top of LWC, said Whitworth, adding that “every single page in the Lightning Experience (not classic) has LWC.” A big part of the appeal of web components to Salesforce is interoperability. “Customers can build their own components or applications and deploy them to Salesforce,” said Whitworth, “and this is actually where the interoperability of web components shines and why we’re excited about the steps we’re taking to enable native web components within LWC on the Salesforce platform.” As for the scalability of web components, Whitworth said they’ve “had very little issues with scaling them and using them across the various properties on Salesforce.com.” LWC itself is used by over 150,000 companies and had over 20 million LWC customer-deployed components by the end of last year. So there’s no doubt it’s working well at scale.

Conclusion

I’ve only touched the surface of web components in this post, but hopefully the case studies of GitHub and Salesforce will inspire many other companies to make the shift towards web components — which offer portability and interoperability advantages compared to frontend frameworks. They also scale well, too.
TRENDING STORIES
Richard MacManus is a Senior Editor at The New Stack and writes about web and application development trends. Previously he founded ReadWriteWeb in 2003 and built it into one of the world’s most influential technology news sites. From the early...
Read more from Richard MacManus
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.