PHPackages                             antheia/antheia - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. antheia/antheia

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

antheia/antheia
===============

Frontend library optimised for web based applications.

2.0.3(3mo ago)4228Apache-2.0PHPPHP ^7.2 || ^8.0CI passing

Since Jun 17Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/cosminstaicu/antheia)[ Packagist](https://packagist.org/packages/antheia/antheia)[ Docs](https://github.com/cosminstaicu/antheia)[ RSS](/packages/antheia-antheia/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)DependenciesVersions (40)Used By (0)

Antheia
=======

[](#antheia)

A PHP library for building responsive, component-based web interfaces, designed for server-rendered web applications.

Antheia is a server-side UI framework for PHP that provides structured, reusable components while preserving full control over rendered HTML. It is built for applications that value predictability, testability, and long-term maintainability over client-side complexity.

> ⚠️ Antheia 2.x is a major release with breaking changes. Versions 1.x.x are no longer supported. Please review the [changelog](CHANGELOG.md) before upgrading.

[![GitHub](https://camo.githubusercontent.com/35d80ba840f30e75ec512609b074f13678be0733ee78a3b409f8e66a2a942cb8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636f736d696e7374616963752f616e7468656961)](https://camo.githubusercontent.com/35d80ba840f30e75ec512609b074f13678be0733ee78a3b409f8e66a2a942cb8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636f736d696e7374616963752f616e7468656961)[![GitHub release (latest by date)](https://camo.githubusercontent.com/e9b565ca9bce8a1fcad05f7b9f5741656b1635ef2da9df9e3789c5aaf2900863/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f636f736d696e7374616963752f616e74686569613f646973706c61795f6e616d653d746167)](https://camo.githubusercontent.com/e9b565ca9bce8a1fcad05f7b9f5741656b1635ef2da9df9e3789c5aaf2900863/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f636f736d696e7374616963752f616e74686569613f646973706c61795f6e616d653d746167)[![E2E Tests](https://github.com/cosminstaicu/antheia/actions/workflows/e2e.yml/badge.svg?branch=main)](https://github.com/cosminstaicu/antheia/actions/workflows/e2e.yml)[![Packagist Downloads](https://camo.githubusercontent.com/a4a57cd1c991f707b6c5e4f8656ec8863c1d894f8182fd3b254e45bb146c4779/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e74686569612f616e7468656961)](https://camo.githubusercontent.com/a4a57cd1c991f707b6c5e4f8656ec8863c1d894f8182fd3b254e45bb146c4779/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e74686569612f616e7468656961)[![PHP Version](https://camo.githubusercontent.com/9b93f78719a030719bd8e8a802882cf8fe17a63a5df0e3a05de80d052a7454aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616e74686569612f616e7468656961)](https://camo.githubusercontent.com/9b93f78719a030719bd8e8a802882cf8fe17a63a5df0e3a05de80d052a7454aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616e74686569612f616e7468656961)[![Live Demo](https://camo.githubusercontent.com/1905b235a66a426cba71db4df8764f12c6847d7e06dfa4a7615fb333a28894dc/68747470733a2f2f696d672e736869656c64732e696f2f776562736974653f646f776e5f6d6573736167653d4f66666c696e652675705f6d6573736167653d4f6e6c696e652675726c3d6874747073253341253246253246616e74686569612e766f697069742e726f)](https://camo.githubusercontent.com/1905b235a66a426cba71db4df8764f12c6847d7e06dfa4a7615fb333a28894dc/68747470733a2f2f696d672e736869656c64732e696f2f776562736974653f646f776e5f6d6573736167653d4f66666c696e652675705f6d6573736167653d4f6e6c696e652675726c3d6874747073253341253246253246616e74686569612e766f697069742e726f)

Why Antheia?
------------

[](#why-antheia)

Antheia is designed for applications that need structured, reusable user interfaces without adopting a full client-side framework.

It is a good fit when:

- You want **server-rendered pages** with a consistent, component-based layout
- You prefer **server-side UI composition in PHP** over full client-side SPA frameworks
- You need **predictable HTML output** that is easy to test end-to-end
- You want to avoid the complexity and build pipelines required by SPA frameworks
- You value **long-term stability**, explicit versioning, and controlled breaking changes
- Your application benefits from **progressive enhancement** rather than full client-side rendering

Antheia focuses on clarity, testability, and maintainability, while remaining flexible enough to integrate into existing PHP applications.

[![03](https://user-images.githubusercontent.com/25685804/196055946-53d4f73d-f524-465d-adee-c9c762bb61a1.png)](https://user-images.githubusercontent.com/25685804/196055946-53d4f73d-f524-465d-adee-c9c762bb61a1.png)

A live example of the interface (based on the current major version) is available at [antheia.voipit.ro](https://antheia.voipit.ro).
The demo uses the content from the `examples` folder.

Please check the [project wiki](https://github.com/cosminstaicu/antheia/wiki) for more details about the library.

Antheia is used in production by the Cloud PBX service **Accolades**, provided by [VoIPIT Romania](https://www.voipit.ro).

Who Antheia is NOT for
----------------------

[](#who-antheia-is-not-for)

Antheia may not be a good fit if:

- You are building a **fully client-side SPA** where most logic and rendering live in the browser
- You expect **real-time UI state management** similar to React, Vue, or Angular
- You want a framework that hides or abstracts away HTML structure
- Your project relies heavily on **frontend build pipelines** and JavaScript-first tooling
- You are looking for a drop-in theme or CMS rather than a UI framework

Antheia is intentionally opinionated toward server-rendered applications with explicit structure and behavior.

Installation
------------

[](#installation)

Use [composer](https://getcomposer.org) to install Antheia into your project:

```
composer require antheia/antheia
```

After installation, you must configure a cache folder for Antheia before rendering any pages.

The cache folder:

- must be writable by the application
- must have a corresponding public URL
- should not be publicly writable beyond what Antheia requires

You can configure it at runtime using:

```
Globals::setCache(string $url, string $path);
```

The `$url` must point to the public URL of the cache directory, while `$path` must be the absolute filesystem path.

Failing to configure the cache correctly will result in runtime errors. This requirement exists to allow Antheia to generate cached assets deterministically.

Quick Start
-----------

[](#quick-start)

```
require __DIR__ . '/vendor/autoload.php';
use Antheia\Antheia\Globals;
use Antheia\Antheia\Page\PageEmpty;
// set up the cache folder
Globals::setCache('/cache', __DIR__ . '/public/cache');
// create a new empty page
$page = new PageEmpty();
// output the page content
echo $page->getHtml();
```

`PageEmpty` represents the minimal Antheia page layout without predefined components.

This will render a minimal, empty Antheia page and output the generated HTML.

End-to-end testing
------------------

[](#end-to-end-testing)

Most HTML items can have a test attribute (with the default name `data-testid`) that will be output only when test mode is enabled. This is useful when the final product needs e2e testing (for example, with [Playwright](https://github.com/microsoft/playwright))

This allows stable selectors for automated end-to-end tests without affecting production HTML output.

```
require __DIR__ . '/vendor/autoload.php';
use Antheia\Antheia\Globals;
use Antheia\Antheia\Page\PageEmpty;
use Antheia\Antheia\Classes\Header\TopRightMenu\TopRightMenuUser;
// set up the cache folder
Globals::setCache('/cache', __DIR__ . '/public/cache');
// create a new empty page
$page = new PageEmpty();
// creates a menu on the top right side
$option = new TopRightMenuUser();
// defines the testid value
$option->setTestId('topMenuUser');
$option->setName('User name here');
$option->setHref('#');
$page->addTopRightMenu($option);
// If Globals::setTestMode() is called then the HTML tag for
// the menu will contain data-testid = "topMenuUser"
// If the method is not called then the HTML tag will not
// have the attribute
Globals::setTestMode();
// output the page content
echo $page->getHtml();
```

Supported Versions
------------------

[](#supported-versions)

- **2.x.x** — actively maintained
- **1.x.x** — end of life, no longer supported

Please review the [changelog](CHANGELOG.md) for more details.

Documentation
-------------

[](#documentation)

All PHP code is documented using the PHPDoc standard. Most IDEs can provide code completion and inline documentation (the library is primarily developed using [Eclipse PDT](https://www.eclipse.org/pdt/)).

JavaScript files are documented using the JSDoc standard.

Examples located in the `examples` folder are explained in detail in the [project wiki](https://github.com/cosminstaicu/antheia/wiki).

For upgrade notes and breaking changes introduced in 2.0.0, refer to the changelog.

Security
--------

[](#security)

Please review our [Security Policy](SECURITY.md) for reporting vulnerabilities.

Credits
-------

[](#credits)

Icons used by the framework are provided by:

- [IO Broker icons](https://github.com/ioBroker/ioBroker.icons-fatcow-hosting)
- [Lucide Icons](https://github.com/lucide-icons/lucide)

Color schemes for the predefined themes are provided freely by [Scheme Color](https://www.schemecolor.com).

Images used by the framework are provided freely by [Unsplash](https://unsplash.com).

License
=======

[](#license)

Antheia is licensed under [Apache-2.0](https://github.com/cosminstaicu/antheia/blob/main/LICENSE).

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance81

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~25 days

Recently: every ~47 days

Total

38

Last Release

103d ago

Major Versions

1.14.3 → 2.0.02025-12-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/744efd886d02d2589daf0dd52728f38d1fa933eee5fd7a8cab711557abe52cf5?d=identicon)[cosmin](/maintainers/cosmin)

---

Top Contributors

[![cosminstaicu](https://avatars.githubusercontent.com/u/25685804?v=4)](https://github.com/cosminstaicu "cosminstaicu (112 commits)")

---

Tags

dark-themefrontendinterfacephpresponsivewebappfrontenddark-mode

### Embed Badge

![Health badge](/badges/antheia-antheia/health.svg)

```
[![Health](https://phpackages.com/badges/antheia-antheia/health.svg)](https://phpackages.com/packages/antheia-antheia)
```

###  Alternatives

[mexitek/phpcolors

A series of methods that let you manipulate colors. Just incase you ever need different shades of one color on the fly.

5003.6M18](/packages/mexitek-phpcolors)[aimeos/ai-controller-frontend

Aimeos business controller logic for frontend

966339.3k12](/packages/aimeos-ai-controller-frontend)[baschte/content-animations

TYPO3 CMS extension to have some fun and animate your content elements

2083.5k](/packages/baschte-content-animations)[abelbm/magento2-disablefrontend

Disable Frontend in Magento 2.

3620.2k](/packages/abelbm-magento2-disablefrontend)[machy8/webloader

Simple, easy to use, php bundler for javascript and css

1934.2k3](/packages/machy8-webloader)[webbuilders-group/silverstripe-frontendgridfield

Wraps gridfield adding support for using it on the front-end.

2029.8k1](/packages/webbuilders-group-silverstripe-frontendgridfield)

PHPackages © 2026

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