PHPackages                             cyberwani/attribute-manager - 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. cyberwani/attribute-manager

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

cyberwani/attribute-manager
===========================

Standalone render-attributes helper (Elementor-compatible API) for building HTML attribute strings safely.

v2.0.0(7mo ago)02MITPHPPHP &gt;=7.4

Since Sep 24Pushed 7mo agoCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

cyberwani/attribute-manager
===========================

[](#cyberwaniattribute-manager)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cfee567468ee0f9e57ff576c57cd96b385e19953c21f4c33a60187cac8d67336/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f637962657277616e692f6174747269627574652d6d616e616765722e7376673f7374796c653d666c6174)](https://packagist.org/packages/cyberwani/attribute-manager)[![Total Downloads](https://camo.githubusercontent.com/20c72fd3e4339066f194cb0839e04d6df5df6408e28845fd807fdd2323a9b36f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f637962657277616e692f6174747269627574652d6d616e616765722e7376673f7374796c653d666c6174)](https://packagist.org/packages/cyberwani/attribute-manager)[![License](https://camo.githubusercontent.com/f48f8d6cf609f5b181b9c3218a85175fe8a5809c7ea400347f39697a5d55065d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c6174)](LICENSE)

A tiny, **standalone** PHP library that mirrors Elementor’s **render attributes** API so you can safely build HTML attribute strings anywhere (not just in WordPress/Elementor).

- Familiar API: `add_render_attribute()`, `get_render_attribute_string()`, etc.
- Safe escaping (`esc_attr`-equivalent).
- Multi-value merging for `class`, `rel`, and common `aria-*` list attributes.
- Singleton handling for `id` (last value wins).
- Simple **singleton helper**: `attribute_manager()`.

---

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

[](#installation)

```
composer require cyberwani/attribute-manager:^2.0
```

> Requires PHP **7.4+**.

Composer autoloads the package via PSR-4 (`Cyberwani\\RenderAttributes\\`) and loads a small helper from `src/helpers.php`.

---

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

[](#quick-start)

```
