Search
Getting Started with Piecesjs: Building Native Web Components with a Lightweight Framework
21.10.2024
Piecesjs is a lightweight JavaScript framework built upon native web components, offering a suite of tools and utilities tailored for creative websites
Callbacks on Web Components?
22.8.2024
A gem from Chris Ferdinandi that details how to use custom events to hook into Web Components. More importantly, Chris dutifully explains why custom events are a better fit than, say, callback functions.
With a typical JavaScript library, you pass
…
Callbacks on Web Components? originally...
Server-first Web Components with DSD, HTMX, and Islands
20.8.2024
A simple yet powerful approach to Web Component server-rendering, declarative behaviors, and JavaScript islands
HTML Web Components Make Progressive Enhancement and CSS Encapsulation Easier!
1.8.2024
I have to thank Jeremy Keith and his wonderfully insightful article from late last year that introduced me to the concept of HTML Web Components. This was the “a-ha!” moment for me:
When you wrap some existing markup in a
…
HTML Web Components Make Progressive Enhancement and...
Using Web Components With Next (or Any SSR Framework)
5.10.2022
In my previous post we looked at Shoelace, which is a component library with a full suite of UX components that are beautiful, accessible, and — perhaps unexpectedly — built with Web Components. This means they can be used …
Using Web Components With Next (or Any SSR Framework) originally...
Building Interoperable Web Components That Even Work With React
7.6.2022
Those of us who’ve been web developers more than a few years have probably written code using more than one JavaScript framework. With all the choices out there — React, Svelte, Vue, Angular, Solid — it’s all but inevitable. One …
Building Interoperable Web Components That Even...
Creating Native Web Components
4.3.2022
Learn how to create and use native web components with the Minze JavaScript framework.
The post Creating Native Web Components appeared first on Codrops
Web Component Pseudo-Classes and Pseudo-Elements are Easier Than You Think
28.2.2022
We’ve discussed a lot about the internals of using CSS in this ongoing series on web components, but there are a few special pseudo-elements and pseudo-classes that, like good friends, willingly smell your possibly halitotic breath before you go …
Web Component Pseudo-Classes...
Context-Aware Web Components Are Easier Than You Think
21.1.2022
Another aspect of web components that we haven’t talked about yet is that a JavaScript function is called whenever a web component is added or removed from a page. These lifecycle callbacks can be used for many things, including making …
Context-Aware Web Components Are Easier Than You Think...
Tonic (Component Framework)
27.9.2021
I enjoy little frameworks like Tonic. It’s essentially syntactic sugar over <web-components /> to make them feel easier to use. Define a Class, template literal an HTML template, probably some other fancy helpers, and you’ve got a component …
The post Tonic (Component...
Supercharging Built-In Elements With Web Components “is” Easier Than You Think
3.9.2021
We’ve already discussed how creating web components is easier than you think, but there’s another aspect of the specification that we haven’t discussed yet and it’s a way to customize (nay, supercharge) a built-in element. It’s similar to …
The post Supercharging Built-In Elements With...
Using Web Components in WordPress is Easier Than You Think
12.8.2021
Now that we’ve seen that web components and interactive web components are both easier than you think, let’s take a look at adding them to a content management system, namely WordPress.
There are three major ways we can add them. …
The post Using Web Components in WordPress is Easier Than...
Awesome Standalone (Web Components)
26.5.2021
In his last An Event Apart talk, Dave made a point that it’s really only just about right now that Web Components are becoming a practical choice for production web development. For example, it has only been about a year …
The post Awesome Standalone (Web Components) appeared first...
Links on Web Components
26.5.2021
How we use Web Components at GitHub — Kristján Oddsson talks about how GitHub is using web components. I remember they were very early adopters, and it says here they released a <relative-time> component in 2014! Now they’ve got a
…
The post Links on Web Components appeared...
Interactive Web Components Are Easier Than You Think
25.3.2021
In my last article, we saw that web components aren’t as scary as they seem. We looked at a super simple setup and made a zombie dating service profile, complete with a custom <zombie-profile> element. We reused the element …
The post Interactive Web Components Are Easier Than...
Web Components Are Easier Than You Think
8.3.2021
When I’d go to a conference (when we were able to do such things) and see someone do a presentation on web components, I always thought it was pretty nifty (yes, apparently, I’m from 1950), but it always seemed complicated …
The post Web Components Are Easier Than You Think appeared first...
Styling Web Components
29.1.2021
Nolan Lawson has a little emoji-picker-element that is awfully handy and incredibly easy to use. But considering you’d probably be using it within your own app, it should be style-able so it can incorporated nicely anywhere. How to allow …
The post Styling Web Components appeared first...
The failed promise of Web Components
20.10.2020
Lea has some words:
Perusing the components on webcomponents.org fills me with anxiety, and I’m perfectly comfortable writing JS — I write JS for a living! What hope do those who can’t write JS have? Using a custom element from the directory often needs to be preceded by a ritual of...
Our Best Posts on Web Components
19.10.2020
A grouping of hand-selected posts from our site about Web Components. We've published a very useful article series from Caleb Williams, so that's here, but also sprinkled in some other informational and link posts on the subject.
The post Our Best Posts on Web Components appeared first...
A Bit on Web Component Libraries
29.7.2020
A run of Web Components news crossed my desk recently so I thought I’d group it up here.
To my mind, one of the best use cases for Web Components is pattern libraries. Instead of doing, say, <ul class="nav nav-tabs"> like you would do in Bootstrap or <div class="tabs"> like...