PHPackages                             gglnx/twig-html-extended-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. gglnx/twig-html-extended-extra

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

gglnx/twig-html-extended-extra
==============================

Extends the HTML extension for Twig

0.7.0(1mo ago)17.5k↓47.2%MITPHPPHP &gt;=8.1.0

Since Jan 6Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/gglnx/twig-html-extended-extra)[ Packagist](https://packagist.org/packages/gglnx/twig-html-extended-extra)[ RSS](/packages/gglnx-twig-html-extended-extra/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependencies (8)Versions (17)Used By (0)

HTML Extended Extra for Twig
============================

[](#html-extended-extra-for-twig)

[![Packagist](https://camo.githubusercontent.com/ce806a2aef77d8328686642f10e0663cbd07c957a712e24934f85ee7901cb74f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67676c6e782f747769672d68746d6c2d657874656e6465642d65787472612e737667)](https://packagist.org/packages/gglnx/twig-html-extended-extra)

This extension extends the [`twig/html-extra`](https://github.com/twigphp/html-extra) with additional HTML related Twig functions:

- `html_id('my-prefix')`: Returns a random, but for this request unique prefixed ID
- `html_attribute('id', 'html-id')`: Renders a HTML attribute, e.g. `id="html-id"`
- `html_attributes({ id: 'html-id', class: {first: true, second: false}, data: {test: '1'} })`: Renders a map of HTML attributes, result: `id="html-id" class="first" data-test="1"`
- `html_styles({ 'font-size': '12px', 'font-weight': bold })`: Renders CSS properties and values, result: `font-size: 12px, font-weight: bold`

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

[](#requirements)

- Twig &gt;=3.20
- PHP &gt;=8.1

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

[](#installation)

The recommended way to install this extension is via [Composer](https://getcomposer.org/):

```
composer require gglnx/twig-html-extended-extra
```

Afterwards you can add this extension to Twig:

```
require_once '/path/to/vendor/autoload.php';

$twig = new \Twig\Environment($loader);
$twig->addExtension(new \Gglnx\TwigHtmlExtendedExtra\Extension\HtmlExtendedExtension());
```

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance92

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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 ~106 days

Recently: every ~218 days

Total

16

Last Release

38d ago

PHP version history (2 changes)0.1.0PHP &gt;=7.2.5

0.7.0PHP &gt;=8.1.0

### Community

Maintainers

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

---

Top Contributors

[![gglnx](https://avatars.githubusercontent.com/u/23519?v=4)](https://github.com/gglnx "gglnx (40 commits)")

---

Tags

twigtwig-extensiontwigtwig-extension

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

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

Twig components for Symfony

22018.6M356](/packages/symfony-ux-twig-component)[symfony/ux-live-component

Live components for Symfony

1647.0M128](/packages/symfony-ux-live-component)[symfony/ux-toolkit

A tool to easily create a design system in your Symfony app with customizable, well-crafted Twig components

16126.1k1](/packages/symfony-ux-toolkit)[mati365/ckeditor5-symfony

CKEditor 5 integration for Symfony

262.6k](/packages/mati365-ckeditor5-symfony)

PHPackages © 2026

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