Progressive Web Components

Hacker News Top Tools

Summary

Ariel Salminen introduces Elena, a 2.6kB open-source library for building Progressive Web Components that render HTML and CSS without JavaScript and enhance progressively. The article explains the design philosophy and taxonomy behind the approach.

<a href="https:&#x2F;&#x2F;github.com&#x2F;arielsalminen&#x2F;elena" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;arielsalminen&#x2F;elena</a><p><a href="https:&#x2F;&#x2F;elenajs.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;elenajs.com&#x2F;</a>
Original Article
View Cached Full Text

Cached at: 07/31/26, 11:00 PM

# Progressive Web Components Source: [https://arielsalminen.com/2026/progressive-web-components/](https://arielsalminen.com/2026/progressive-web-components/) I’ve worked with[web components](https://elenajs.com/)for nearly a decade and built various enterprise\-scale design systems with them\. While I love what they offer on paper, the same pain points keep coming back: Layout shifts, flash of unstyled content, poor server\-side rendering support, too much reliance on client side JavaScript, doesn't play well with frame­works like React Server Components, accessibility issues, and so on… Despite all of this, I still think web components are a great foundation for a[design system](https://arielsalminen.com/services/)\. No other approach gives you true cross\-framework portability built on what the web platform already provides\. The problem isn’t necessarily the model itself, it’s how we’ve been building them\. This is how I ended up creating[Elena](https://elenajs.com/), a library that I’m[open sourcing](https://github.com/arielsalminen/elena)today\. Elena starts from HTML and CSS, and stays grounded in web standards and what the web platform natively provides\. ## What is a Progressive Web Component? A[Progressive Web Component](https://elenajs.com/components/overview)is a native Custom Element designed in two layers: a base layer of HTML and CSS that renders immediately, without JavaScript, and an enhancement layer of JavaScript that adds reactivity, event handling, and more advanced templating\. There are three types of Progressive Web Components: 1. **Composite Components**that wrap and enhance the HTML composed inside them\. All of their HTML and CSS lives in the Light DOM\. You could also call these[HTML Web Components](https://adactio.com/journal/20618)\. 2. **Primitive Components**that are self\-contained and render their own HTML\. All of their CSS lives in the Light DOM together with the base HTML required for rendering the initial state\. 3. **Declarative Components**that are a hybrid of these and utilize[Declarative Shadow DOM](https://elenajs.com/components/templates#declarative-shadow-dom)\. ![A diagram explaining the three types of Progressive Web Components.](https://arielsalminen.com/img/blog/elena.svg)***Note:**Elena doesn’t force this taxonomy\. They’re[all just web components](https://elenajs.com/advanced/faq#can-i-build-normal-web-components-with-elena), and you choose how to build yours\. But since “Progressive Web Components” is a design philosophy rather than a library feature, understand­ing the distinction between these approaches helps when deciding what fits your use case\.* ## So what is Elena, anyway? [Elena](https://elenajs.com/)is a simple, tiny library \(`2\.6kB`\) for helping you to build[Progressive Web Components](https://elenajs.com/components/overview)\. Unlike most web component libraries, Elena doesn’t force JavaScript for everything\. You can load HTML and CSS first, then use JavaScript to progressively add interactivity\. I built Elena for teams creating[component libraries](https://elenajs.com/advanced/libraries)and[design systems](https://elenajs.com/advanced/libraries)\. If you need web components that work across[multiple frameworks](https://elenajs.com/advanced/frameworks), render HTML and CSS before JavaScript loads, and sidestep common issues like accessibility problems, server\-side rendering limitations, and layout shifts, Elena is built for exactly that\. It handles the cross\-framework complexity*\(prop/attribute syncing, event delegation, framework compatibility\)*so you can focus on building web components rather than plumbing\. [![A screenshot of Elena’s lifecycle documentation.](https://arielsalminen.com/img/blog/elena-2.png)](https://elenajs.com/components/lifecycle)A screenshot of Elena’s lifecycle documentation\.Since[Progressive Web Components](https://elenajs.com/components/overview)is a design philosophy rather than a library feature, Elena also allows you to build regular web components\. The full standard custom element lifecycle and features such as open or closed[Shadow DOM](https://elenajs.com/components/styles#shadow-dom),`<template\>`,`<slot\>`and even[Declarative Shadow DOM](https://elenajs.com/advanced/ssr#declarative-shadow-dom)are all supported out of the box\. ## What is Elena’s approach to SSR? Elena’s approach to[server\-side rendering](https://elenajs.com/advanced/ssr)is simple and straightforward\. Since Progressive Web Components are primarily HTML and CSS, you don’t need any special logic on the server to render them\. Components without a`render\(\)`method are fully SSR\-compatible by default, while components with`render\(\)`provide partial support and complete hydration on the client side\. The*“partial support”*bit for the latter means that you can render the initial state without JavaScript, but JS is needed for the interactivity*\(unless you also use the provided[@elenajs/ssr](https://elenajs.com/advanced/ssr)tool\)\.* Elena also supports[Declarative Shadow DOM](https://elenajs.com/components/templates#declarative-shadow-dom)for cases where you may need stronger isolation, but still want the component to render server\-side\. [![Elena comman line interface](https://arielsalminen.com/img/blog/cli.png)](https://elenajs.com/advanced/cli)A screenshot of Elena’s command line interface\.## Release candidate is out today\! I’m super happy to announce thefirst**seventh**release candidate of[Elena](https://elenajs.com/),`v1\.0\.0\-rc\.7`today\. This release comes with a bunch of useful features aimed at product teams creating component libraries\. 🎉 ## Feature highlights include: ### 🔋 Extremely lightweight `2\.6kB`minified and compressed, simple and tiny by design\. ### 📈 Progressively enhanced Renders HTML and CSS first, then hydrates with JavaScript\. ### 🫶 Accessible by default Semantic HTML foundation with no Shadow DOM barriers\. ### 🌍 Standards based Built entirely on native custom elements and web standards\. ### ⚡ Reactive updates Prop and state changes trigger efficient, batched re\-renders\. ### 🎨 Scoped styles Simple and clean CSS encapsulation without complex workarounds\. ### 🖥️ SSR friendly Works out of the box, with optional server\-side utilities if needed\. ### 🧩 Zero dependencies No runtime dependencies, runs entirely on the web platform\. ### 🔓 Zero lock\-in Works with every major framework, or no framework at all\. ## Included packages Elena is divided into[13 npm packages](https://github.com/arielsalminen/elena)published under the`@elenajs`scope\. These are the main packages intended for development: - [**`@elenajs/core`**](https://elenajs.com/): Elena core runtime\. The thing you’d use 99% of the time, other packages are just supporting tooling\. - [**`@elenajs/bundler`**](https://elenajs.com/advanced/libraries): Bundler for Elena web component libraries\. - [**`@elenajs/cli`**](https://elenajs.com/advanced/cli): CLI for scaffolding Elena web components\. - [**`@elenajs/ssr`**](https://elenajs.com/advanced/ssr): Server\-side rendering tools for Elena\. - [**`@elenajs/mcp`**](https://elenajs.com/advanced/mcp): MCP server to support working with Elena\. - [**`@elenajs/components`**](https://elenajs.com/examples/): Example Progressive Web Components\. ## Next steps - To learn more, visit Elena’s website:[https://elenajs\.com](https://elenajs.com/) - Browse the[FAQ](https://elenajs.com/advanced/faq)for frequently asked questions - View the[live examples](https://elenajs.com/examples/)for demos - Try Elena in the[playground](https://elenajs.com/playground/) [Learn more](https://elenajs.com/)[Elena on GitHub](https://github.com/arielsalminen/elena) ![Written by Ariel Salminen.](https://arielsalminen.com/img/signature.png) [![Ariel Salminen.](https://arielsalminen.com/img/arielle.webp) ## Get in Touch Does your team need help?I’m Ariel Salminen, a Design Systems Architect specialized in helping organizations build and maintain design systems\.I’m available for both local and remote projects around the world\.](https://arielsalminen.com/)

Similar Articles

Just Fucking Use React

Lobsters Hottest

This opinionated article aggressively advocates for using modern JavaScript frameworks like React over pure HTML for complex web applications, arguing that complexity requires proper tooling.

Show HN: A CSS 3D Engine (no WebGL)

Hacker News Top

PolyCSS is a CSS polygon mesh library that renders 3D models as real HTML elements using CSS matrix3d, supporting OBJ/MTL, GLB, and VOX formats with React, Vue, or vanilla JS.

HTML-in-Canvas Demos

Hacker News Top

A collection of CSS and Web UI demos from the Chrome DevRel team, including HTML-in-Canvas demos.

HTMX Is So Cool I Rolled My Own

Lobsters Hottest

The article explores HTMX, a library that favors server-rendered HTML over JavaScript-heavy frontends. The author finds HTMX useful for persistent UI components but ultimately decides to roll their own solution due to personal preference for minimal dependencies.