PHPackages                             twig/html-extra - 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. [Templating &amp; Views](/categories/templating)
4. /
5. twig/html-extra

ActiveLibrary[Templating &amp; Views](/categories/templating)

twig/html-extra
===============

A Twig extension for HTML

v3.24.0(2mo ago)788.8M↓24.2%720MITPHPPHP &gt;=8.1.0

Since Aug 12Pushed 2w ago3 watchersCompare

[ Source](https://github.com/twigphp/html-extra)[ Packagist](https://packagist.org/packages/twig/html-extra)[ Docs](https://twig.symfony.com)[ GitHub Sponsors](https://github.com/fabpot)[ Fund](https://tidelift.com/funding/github/packagist/twig/twig)[ RSS](/packages/twig-html-extra/feed)WikiDiscussions 3.x Synced 1w ago

READMEChangelog (3)Dependencies (8)Versions (60)Used By (20)

Twig HTML Extension
===================

[](#twig-html-extension)

This package is a Twig extension that provides the following:

- [`data_uri`](https://twig.symfony.com/data_uri) filter: generates a URL using the data scheme as defined in RFC 2397;
- [`html_classes`](https://twig.symfony.com/html_classes) function: returns a string by conditionally joining class names together.
- [`html_cva`](https://twig.symfony.com/html_cva) function: returns a `Cva` object to handle class variants.

###  Health Score

70

—

ExcellentBetter than 100% of packages

Maintenance90

Actively maintained with recent releases

Popularity60

Solid adoption and visibility

Community37

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 72.5% 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 ~42 days

Total

60

Last Release

17d ago

Major Versions

v2.14.9 → v3.4.02022-01-02

v2.15.5 → v3.5.12023-02-08

v2.15.6 → v3.7.12023-07-29

v2.16.0 → v3.9.02024-02-10

3.x-dev → v4.0.0-alpha12026-03-17

PHP version history (6 changes)v2.12.0PHP ^7.1.3

v2.14.0PHP &gt;=7.1.3

v3.8.0PHP &gt;=7.2.5

v3.12.0PHP &gt;=8.0.2

v3.20.0PHP &gt;=8.1.0

v4.0.0-alpha1PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47313?v=4)[Fabien Potencier](/maintainers/fabpot)[@fabpot](https://github.com/fabpot)

---

Top Contributors

[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (58 commits)")[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (4 commits)")[![kbond](https://avatars.githubusercontent.com/u/127811?v=4)](https://github.com/kbond "kbond (2 commits)")[![mpdude](https://avatars.githubusercontent.com/u/1202333?v=4)](https://github.com/mpdude "mpdude (2 commits)")[![Guite](https://avatars.githubusercontent.com/u/277531?v=4)](https://github.com/Guite "Guite (1 commits)")[![javiereguiluz](https://avatars.githubusercontent.com/u/73419?v=4)](https://github.com/javiereguiluz "javiereguiluz (1 commits)")[![jmsche](https://avatars.githubusercontent.com/u/3929498?v=4)](https://github.com/jmsche "jmsche (1 commits)")[![nlemoine](https://avatars.githubusercontent.com/u/2526939?v=4)](https://github.com/nlemoine "nlemoine (1 commits)")[![noniagriconomie](https://avatars.githubusercontent.com/u/13205768?v=4)](https://github.com/noniagriconomie "noniagriconomie (1 commits)")[![pgrimaud](https://avatars.githubusercontent.com/u/1866496?v=4)](https://github.com/pgrimaud "pgrimaud (1 commits)")[![ruudk](https://avatars.githubusercontent.com/u/104180?v=4)](https://github.com/ruudk "ruudk (1 commits)")[![WebMamba](https://avatars.githubusercontent.com/u/32077734?v=4)](https://github.com/WebMamba "WebMamba (1 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (1 commits)")[![abdounikarim](https://avatars.githubusercontent.com/u/15892761?v=4)](https://github.com/abdounikarim "abdounikarim (1 commits)")[![yoeunes](https://avatars.githubusercontent.com/u/10859693?v=4)](https://github.com/yoeunes "yoeunes (1 commits)")[![alexandre-daubois](https://avatars.githubusercontent.com/u/2144837?v=4)](https://github.com/alexandre-daubois "alexandre-daubois (1 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (1 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (1 commits)")

---

Tags

htmlphptemplatingtwigtwightml

### Embed Badge

![Health badge](/badges/twig-html-extra/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M370](/packages/easycorp-easyadmin-bundle)[symfony/ux-twig-component

Twig components for Symfony

21917.2M298](/packages/symfony-ux-twig-component)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M195](/packages/sulu-sulu)[twig/markdown-extra

A Twig extension for Markdown

12115.5M114](/packages/twig-markdown-extra)[symfony/ux-live-component

Live components for Symfony

1636.5M111](/packages/symfony-ux-live-component)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M395](/packages/drupal-core-recommended)

PHPackages © 2026

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