DEV Community

Cover image for Web Components in 2025: Building Better Websites for Everyone

Web Components in 2025: Building Better Websites for Everyone

Kudzai Murimi on December 24, 2024

Few days left to go to 2025, where web components are changing how we build and enjoy websites. These handy tools make creating websites easier, fa...
Collapse
 
dannyengelman profile image
Danny Engelman

or chain those statements:

constructor() {
    super() // sets AND returns 'this' scope
       .attachShadow({ mode: 'open' }) // sets AND returns this.shadowRoot
       .innnerHTML = `YOUR HTML HERE`
Enter fullscreen mode Exit fullscreen mode
Collapse
 
respect17 profile image
Kudzai Murimi
Collapse
 
macko profile image
Michael Nuertey

hello, how do you come about this snippet?

Collapse
 
dannyengelman profile image
Danny Engelman

Read The Fine Manual

Collapse
 
martygo profile image
Martins Gouveia

Your post is a gem 💎. Thanks for sharing. Bring more about Web Components if possible.

Collapse
 
respect17 profile image
Kudzai Murimi

Thank you so much, i promise you that i will!

Thanks for your support

Collapse
 
lucacestola profile image
Luca Cestola

... and they are standard. I remember Rob Eisenberg's foresight when, speaking for Aurelia, he noted that there was no need to invent the wheel again as so many other frameworks did.

Collapse
 
respect17 profile image
Kudzai Murimi

You're welcome

Collapse
 
wafa_bergaoui profile image
Wafa Bergaoui

The LEGO analogy is brilliant—it makes understanding web components approachable and fun! I particularly appreciate the clear examples that demonstrate how to create and use custom elements. Well done! 🎉

Collapse
 
respect17 profile image
Kudzai Murimi

i am happy that you found the article helpful

Collapse
 
uzondu9 profile image
Uzondu
Collapse
 
uzondu9 profile image
Uzondu

My current skills are in HTML, CSS, Sass, JavaScript, TypeScript(the basics) and Git(basic and intermediate concepts too). However I am still creating projects and building my portfolio. I have decided to avoid freelancing until I am really good, though when I was still starting out, I registered on Upwork out of excitement and have been offline since. But with every project I work on I become better and my most recent project:

has me so confident I now feel I should start freelancing but utilizing my first frontend skill which is HTML and using it to create email templates
Image
and I believe earning while learning will help to keep to me motivated
and transition slowly to selling more of my skills. Sorry if my comment is so long but the post seems to have something on this my new venture. I would like some advice on this and what it would take to learn it if would go this way.
Collapse
 
denis-mgaya profile image
Denis Mgaya

This is so cool

Collapse
 
georgewl profile image
George WL

Honestly I really like the idea of web-components but feel like they're missing core features that libraries have as default

Collapse
 
valkoivo profile image
Valkoivo

What do you think, for example, what features are missing?

Collapse
 
deeee5 profile image
Dadirai Ngandu

Hi I am a fresh upstart who has no clue on webdevelopment and coding which software would you recommend I use and how I will also save them on github

Collapse
 
respect17 profile image
Kudzai Murimi

Hello @deeee5 !

Ok, worry not i am here to help you
First:
Do you have exprience with HTML, CSS and Javascript or did you read above them?
If you have not yet, you can learn about them for free in
freecodecamp.org/learn/?messages=s...

These are the basics to start with.

Have you ever used Codepen? codepen.io/
Have you ever used VS Code code.visualstudio.com/

CodePen and VS Code are used for code editing, as for now that's where you can practise coding

Let me know if you have enough info with the above then we can proceed.