#CustomElements

Jens Oliver Meiert ๐Ÿ‡บ๐Ÿ‡ณ ๐Ÿ‡ต๐Ÿ‡ธj9t@mas.to
2026-01-12

Custom elements can have default accessibility semantics which should be stated and encouraged not to override.

#html #customelements #accessibility

2026-01-06

Iโ€™m making #HTML #CustomElements using <template>; is there no way to opt-in to have it inherit styles from the parent document? It's a really nice way to encapsulate some reusable markup and behavior, but I still want all my buttons to look the same :neobread_think:

Inautiloinautilo
2026-01-05
Inautiloinautilo
2026-01-02


Installing custom elements dynamically ยท A reusable pattern for on-the-fly custom element loading ilo.im/169hh8

_____

lmorchard's linkslinks@lmorchard.com
2025-12-30

How To Dynamically Install Custom Elements: HeydonWorks

"Today, I want to look into one very specific topic in excruciating technical detail: how to dynamically load custom elements."

https://heydonworks.com/article/dynamically-loading-custom-elements/

#customelements #webcomponents #webdev

lmorchard's linkslinks@lmorchard.com
2025-12-19

The handleEvent() method is the absolute best way to handle events in Web Components | Go Make Things

"A bunch of people shared their own approaches, but the one that absolutely blew my mind was the handleEvent() method, a platform-native method for managing all of the events on your Web Component."

https://gomakethings.com/the-handleevent-method-is-the-absolute-best-way-to-handle-events-in-web-components/

#customelements #js #web #webcomponents #webdev

lmorchard's linkslinks@lmorchard.com
2025-12-19

My HTML Web Component boilerplate for 2026 | Go Make Things

"I created web component boilerplate years ago. Since then, my approach to writing web component has changed quite a bit.

I just updated the boilerplate, adding everything Iโ€™ve learned from working on Kelp UI. Today, I wanted to explain how it works."

https://gomakethings.com/my-html-web-component-boilerplate-for-2026/

#customelements #web #webcomponends #webdev

Benny Powers ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿฆbp@social.bennypowers.com
2025-12-04

๐Ÿšจ Feature drop: cem serve - a manifest-driven dev server for #WebComponents ๐Ÿงฉ

Think
#Storybook, but opinionated for #HTML #CustomElements:

๐Ÿ“„ Write demos as plain HTML (not JSX/MDX stories)
๐ŸŽ›๏ธ Auto-generate knobs from manifest metadata
โšก Smart reload - only reloads affected demos
๐Ÿ“ฆ No build step (#TypeScript transformed on-the-fly)

Your demos are just HTML โ†’ users can copy them directly from docs, works in any framework.

Read:
bennypowers.dev/posts/custom-elements-dev-server/
Try:
npx @pwrs/cem serve

#WebComponents #HTML #DevTools

Screenshot of custom elements dev server with avatar elements displayed, and knobs panel open
2025-12-03

In the last ~6 months someone linked to their blog about using JS-free custom elements for page structure and style in place of a methodology like BEM, e.g. using `<my-element>`/`my-element {}` instead of `<div class="my-element">`/`.my-element {}`. Might have referenced [HUG CSS](gomakethings.com/hug-css-how-i) as well. I'm sure I bookmarked it but I'll be darned if I can find it again. Pointers please?

[update: found it, or close enough. mastodon.peterjanes.ca/@me/115]

#customElements #webComponents #css

lmorchard's linkslinks@lmorchard.com
2025-12-02

Custom Asidenotes โ€“ Ericโ€™s Archived Thoughts

"Previously on meyerweb, I crawled through a way to turn parenthetical comments into sidenotes, which I called โ€œasidenotesโ€. As a recap, these are inline asides in parentheses, which is something I like to do. The constraints are that the text has to start inline, with its enclosing parentheses as part of the static content, so that the parentheses are present if CSS isnโ€™t applied, but should lose those parentheses when turned into asidenotes, while also adding a sentence-terminating period ..."

https://meyerweb.com/eric/thoughts/2025/10/29/custom-asidenotes/

#customelements #metablogging #webcomponents #webdev

2025-11-10

The big thing that sets Joist's dependency injection library apart from others is the fact that the same library work in #Node in the browser, AND with Custom Elements.

github.com/joist-framework/joi

#webcomponents #customelements #javascript

2025-11-07

Does anyone have a favorite #WebComponent that validates at least one of a group of checkbox inputs is checked?

#WebComponents #HTML #CustomElements

2025-11-06

Okay I wonder.
Is there a web component which is like a `<select>` but allows me to have divs/spans as options?

#javascript #webcomponents #CustomElements

N-gated Hacker Newsngate
2025-10-19

๐Ÿš€ listens to Turbo Streams like a toddler with a new toy: it just adds, removes, or rearranges things because it can. ๐Ÿค– Custom HTML elements are apparently magic wands that make website changes without asking if itโ€™s a good idea. ๐Ÿง™โ€โ™‚๏ธ It's like giving a squirrel caffeine and watching it "organize" nuts. ๐Ÿ‚๐Ÿ’จ
ducktypelabs.com/how-does-turb

Benny Powers ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿฆbp@social.bennypowers.com
2025-10-03

cem v0.6.0 adds JSX support to the LSP server

github.com/bennypowers/cem/releases/tag/v0.6.0

cem is a command line tool for working with #customElements (#webComponents). It includes a custom elements manifest generator and validator, various query methods for manifests, and #LSP and #MCP servers

Nathan Knowlerknowler@sunny.garden
2025-09-17

I love that you can expose a shadow part with multiple names using `exportparts`.

```html
<site-header exportparts=nav-list,nav-list:header-nav-list></site-header>
<site-footer exportparts=nav-list,nav-list:footer-nav-list></site-footer>
```

#HTML #CSS #CustomElements #ShadowDOM

Nathan Knowlerknowler@sunny.garden
2025-09-03

Composition with the Shadow DOM is more powerful than you think. You can do a lot with the default named slot assignment, but manual slot assignment is a pathway to many abilities some consider to beโ€ฆ unnatural.</emperor-palpatine>

knowler.dev/blog/an-intro-to-m

#WebComponents #CustomElements #ShadowDOM #HTML #WebDev

Benny Powers ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿฆbp@social.bennypowers.com
2025-09-01

New #cem release, the multitool for #customElements manifest files - make working with #webComponents a breeze!

github.com/bennypowers/cem/releases/tag/v0.4.5

This release adds a module graph to the LSP missing imports diagnostic.

Say you import the module that defines
, and that module imports the definition for . Let's also say that the my-tab module imports the definition for . With this update, you'll no longer get errors for failing to import my-tab and my-icon, since they're included in my-tabs' module graph.

Benny Powers ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿฆbp@social.bennypowers.com
2025-08-20

๐Ÿš€ The CEM Language Server is here!

Remember the frustration of working with custom elements in your editor? No auto-complete for
, no hover docs for attributes, go-to-definition that just... doesn't?

Those dark ages are over.
โœจ

I built a complete toolchain from scratch in Go that changes everything:

๐Ÿ”ฌ Analyzes your TypeScript/JavaScript to understand your custom elements
๐Ÿ“‹ Generates Custom Element Manifest files from your source code
๐Ÿง  Provides Language Server Protocol support for amazing editor integration

You get:
๐ŸŽฏ Smart completions for element names, attributes, slots
๐Ÿ“š Hover documentation pulled directly from your code
๐Ÿ” Go-to-definition that actually works
โšก Real-time validation and error checking
๐Ÿ› ๏ธ Works with VS Code, Zed, Neovim, Emacs

The beautiful part? It's a complete end-to-end solution. One tool that both understands your code AND provides the editor experience. Zero serialization overhead, perfect consistency.

Built on the shoulders of
@matsuuu 's pioneering work with custom-elements-language-server. This explores a different architectural approach while building on his insights about what features matter most.

Finally - TypeScript-level tooling for our
! ๐ŸŽ‰

๐Ÿ“– bennypowers.dev/cem/docs/lsp/
๐Ÿ’ฌ github.com/bennypowers/cem/discussions
๐ŸชŸ marketplace.visualstudio.com/items?itemName=pwrs.cem-language-server-vscode
#WebComponents #LSP #DeveloperTools #Lit #CustomElements #OpenSource #Go #TypeScript

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst