PHPackages                             slogsdon/web-component-ssr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. slogsdon/web-component-ssr

ActiveLibrary

slogsdon/web-component-ssr
==========================

Provides server-side rendering support for native web components / custom elements

1813PHP

Since May 8Pushed 5d ago2 watchersCompare

[ Source](https://github.com/slogsdon/php-web-component-ssr)[ Packagist](https://packagist.org/packages/slogsdon/web-component-ssr)[ RSS](/packages/slogsdon-web-component-ssr/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

> **[shane.logsdon.io](https://shane.logsdon.io)** — writing and projects on agentic workflows, web standards, and payments engineering.

web-component-ssr
=================

[](#web-component-ssr)

> Provides server-side rendering support for native web components / custom elements

### Features

[](#features)

- Plain PHP and JavaScript
- Native [web components](https://developer.mozilla.org/en-US/docs/Web/Web_Components)
- Minimal dependencies

### Reasoning

[](#reasoning)

PHP is easy to install, if not already present on you computer. PHP runs pretty much everywhere. PHP is flexible.

JavaScript is in a similar boat. It's readily available and flexible. Modern browser JavaScript is more than capable.

This project also scratches an itch to see how much PHP and JavaScript can work together to handle this problem domain.

Requirements
------------

[](#requirements)

- [PHP 7.1+](http://www.php.net/)
- [Composer](https://getcomposer.org/) (for PHP autoloader only)
- [`web-component-hydration`](https://www.npmjs.com/package/web-component-hydration)

Running the demo
----------------

[](#running-the-demo)

```
cd examples/simple && yarn install
cd ../.. && composer start

```

This will install a local copy of `web-component-hydration` and call the `start` Composer script defined in `composer.json` and execute the built-in PHP server.

On page load, PHP will output a template file as HTML. It will also prepare the client-side template. Once the DOM has loaded, the JavaScript will load the web component's custom element and replace all PHP created instances of the template with browser/JavaScript created instances.

License
-------

[](#license)

This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance65

Regular maintenance activity

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae9739f6c5a88f993d261d12627d43305c71b97951834d3ffbb488a4b5722445?d=identicon)[slogsdon](/maintainers/slogsdon)

---

Top Contributors

[![slogsdon](https://avatars.githubusercontent.com/u/647624?v=4)](https://github.com/slogsdon "slogsdon (15 commits)")

---

Tags

custom-elementsdeclarative-shadow-domphpserver-side-renderingweb-components

### Embed Badge

![Health badge](/badges/slogsdon-web-component-ssr/health.svg)

```
[![Health](https://phpackages.com/badges/slogsdon-web-component-ssr/health.svg)](https://phpackages.com/packages/slogsdon-web-component-ssr)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
