š©Thinking about diving into frontend dev or design? You didnāt land here by mistake ā this is your SIGN.
Here's what you'll be learning:
Spending hours over making your website responsive and achieve uniformity?
You are not alone :)
To achieve web uniformity and responsiveness across different devices, browsers, accessibility, performance, and async states- complexities in the frontend have only risen leading to building 10s and 100s of UI. Relatable?
This problem everyone can relate to while building anything from a simple portfolio website ā enterprise level website.
Amidst all that, think what inconsistent styling, poor accessibility, fragile API, unpredictable performance, A shadow-DOM button that ignores theme fonts, a component lacking keyboard focusābulk UI debt can do to your impact.
As frontends scale, even with component-driven tools like React, Vue, or Angular, you often end up with hundreds of components and thousands of variationsāadding complexity rather than eliminating it.
Web Components: Your Solutionš§Ŗ
"Web Components" is an umbrella term that refers to a collection of web standards focused on enabling the creation of custom HTML elements. ~ Microsoft
Web Components can be a savior in these scenarios which also roots for your long-term consistency and performance.
Web Components in UX are Custom Elements + Shadow DOM that provide encapsulation, reusability, and a clean API. Three main elements in web components-
- Custom Elements: JavaScript APIs that let you define your own HTML tags and behaviors for use in your UI.
- Shadow DOM: A JavaScript API that attaches a private, encapsulated DOM subtree to an element, allowing isolated scripting and styling without affecting the rest of the document.
- HTML Templates: The and elements provide reusable chunks of markup that remain hidden until theyāre instantiated, often inside custom elements.
Heard of these Companies? Yes, they use web components tooš

You can check out this video by Cassondra Roberts, Staff Design Engineer, Adobe for Shadow DOM
Major Web Components Gains:š
- Highly customizable with custom elements and HTML templates.
- Deploy them across mobile, desktop, web devices.
- High Framework-agonistic: use Web Components with any of these frameworks like React, Angular, Vue.
Web Components also has some TradeāOffs:š
- Web Components' reliance on browser-specific APIs and Shadow DOM complicates their server-side rendering, making cross-framework SSR integration challenging.
- Encapsulation via Shadow DOM can hinder proper ARIA attribute application and focus management, necessitating meticulous planning for accessibility.
- Web Components may introduce lock-in issues with meta-frameworks, bundlers, and testing tools, and may not seamlessly integrate with existing frameworks like React or Vue
Design System == Your Blueprint š
Think of it as a blueprint that helps to keep the product look and feel uniform and consistent.
It is a central library of components, style guides, accessibility guidelinesāserving as a single source of truth. It streamlines workflow and accelerates development process with design tokens.
Quick FAQ: Design tokens are small, reusable design decisions that make up a design system's visual style.
Here is a guide by Figma on building Design Systems
Your mantra if you're starting out
Wireframe Components ā build template + Shadow DOM prototype ā test
Enter Storybook: Design System Catalyst
Recently I came across Storybook is an open-source UI component workshopāa development environment where you build, test, showcase, and document your web components in isolation, away from the complexity of your full application
Each component in Storybook is accompanied by "stories"āinteractive examples that showcase different states and configurations. These stories serve as both documentation and test cases.
In essence, Storybook transforms your UI components into self-contained units that are easier to develop, test, and maintain, all while fostering better collaboration and communication within your team.
Read more about Storybook and how to get started
UX Maturity Journey for Different Stage Enterprises:
Immature Stage:
Team Setup: No UX, solo dev/design
What it's like:
- UX isnāt plannedāfeatures jump straight to code.
- You're coding blindāno wireframes, A/B tests, or user research.
- No user feedback or research; decisions are based on guesses
- You patch UI issues reactively when bugs or complaints emerge.
Tip: If youāre here, you could practice these to bring in clarity
Easy first steps:
- Start by asking: Who is this for? Whatās the problem?
- Do quick guerrilla testsāgrab 3ā5 users to watch them try a flow
- Install a basic analytics tool (Hotjar/Clarity) to see click patterns.
Emergent Stage:
Team Setup: UX advocate + dev + product (less sync)
What it's like:
- UX flows feel baked into sprint planning.
- There's a basic design system and shared components
- Build wireframes ā prototypes ā test & iterate.
- Use storybook/design tokens for consistency.
- Use simple UX metrics: onboarding completion, task time.
Matured Stage:
Team Setup: UX cross teams + dev + product in sync
What it's like:
- UX drives strategyānot just features
- Design system is robust; UX team involved early.
- Youāre shipping experiences users love, efficiently and iteratively.
- Metrics like NPS, task success are part of your dashboards.
- Code is maintainable, with reusable components and animations that reinforce UX.
- Continuous discoveryāuser feedback feeds product roadmap.
Best Practices CheckList: āļø
āļø Define target audience. Ask: Whoās using this component? What problem does it solve?
āļø Start small by designing mockups for your custom elements or basic usability tests(3-5 folks clicking through)
āļø Normalize UX in your sprint. Add UX checklist before dev.
āļø Use shared UI code.This is where you start building your web components.
āļø Measure impact. Track signup flow time, onboarding drop-offs, NPS scores, onboarding completion rate, satisfaction scores. This will help you to zero in on the areas where users drop-off.
āļø Share wins. Show how fixing one UX bug improved conversionsāturn dev effort into product impact.
Other Resources You Can Check Out:
- Shoelace is a gold standard of web component libraries. You can also check out best practices at Shoelace
- Spectrum Web ComponentsAdobeās Design System, web component flavored.
- Another great general list of best practices.
Special thanks to @debajit13 for feedback on a draft of this blog post.
Top comments (0)