PHPackages                             icetea/icedom - 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. icetea/icedom

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

icetea/icedom
=============

PHP pure and simple VDOM

1.0.0(6mo ago)08[2 PRs](https://github.com/khanhicetea/icedom/pulls)1MITPHPPHP ^8.1CI passing

Since Oct 14Pushed 1mo agoCompare

[ Source](https://github.com/khanhicetea/icedom)[ Packagist](https://packagist.org/packages/icetea/icedom)[ Docs](https://github.com/icetea/icedom)[ GitHub Sponsors](https://github.com/khanhicetea)[ RSS](/packages/icetea-icedom/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (6)Used By (1)

PHP pure and simple VDOM
========================

[](#php-pure-and-simple-vdom)

[![Latest Version on Packagist](https://camo.githubusercontent.com/825206d8d2bfcbad47d2de2e87b1091df4b2d3560b54644d431aa397f64ec29a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6963657465612f696365646f6d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/icetea/icedom)[![Tests](https://camo.githubusercontent.com/c4f698549c6e1c2abc86057888f1ead181c57b812900eda929e1edcdbf524bad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6963657465612f696365646f6d2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/icetea/icedom/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/81194eda2de90daed6edfe4613606c824da5f06e2c4ad9369c26bd5e3cf8511e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6963657465612f696365646f6d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/icetea/icedom)

**IceDOM** is a pure PHP library for building HTML documents using a Virtual DOM-like approach. Write HTML in PHP with a fluent, type-safe API—no templates required. All content is automatically escaped to prevent XSS attacks.

Key Features
------------

[](#key-features)

- 🔒 **Automatic XSS Protection** - All content is escaped by default
- 🎯 **Type-Safe** - Full IDE autocomplete and type hints
- 🔄 **Virtual DOM-like** - Build HTML using PHP objects and methods
- 🎨 **Fluent API** - Chain methods for clean, readable code
- 🚀 **Zero Dependencies** - Pure PHP, no external libraries
- 📦 **150+ HTML Tags** - All standard HTML5 elements included

Quick Example
-------------

[](#quick-example)

```
use function IceTea\IceDOM\{_div, _h1, _p, _button};

$card = _div(['class' => 'card'], [
    _h1('Welcome to IceDOM'),
    _p('Build HTML with PHP, fluently and safely.'),
    _button(['class' => 'btn-primary'], 'Get Started'),
]);

echo $card;
// Output: Welcome to IceDOM...
```

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

[](#installation)

You can install the package via composer:

```
composer require icetea/icedom
```

Usage
-----

[](#usage)

Read full usage document here : [Usage](./USAGE.md)

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- Ideas, Write Core Classes, Review Docs - Tests : [KhanhIceTea](https://github.com/khanhicetea)
- PHPDocs, Tests : LLMs (because it writes these better and faster than me)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance80

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.6% 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 ~10 days

Total

3

Last Release

197d ago

Major Versions

0.1.1 → 1.0.02025-11-02

PHP version history (2 changes)0.1.0PHP ^8.3

1.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7813bb37bdbd56acf5eb3e1fdcbe1f31c34fcb16134a1538ee7d7b6b9d2825af?d=identicon)[khanhicetea](/maintainers/khanhicetea)

---

Top Contributors

[![khanhicetea](https://avatars.githubusercontent.com/u/4528223?v=4)](https://github.com/khanhicetea "khanhicetea (50 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

iceteaicedom

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

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

PHPackages © 2026

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