Download the PHP
package ui-awesome/html-helper without Composer
On this page you can find all versions of the php package
ui-awesome/html-helper. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
A powerful PHP library to simplify HTML element creation Generate attributes, encode content, sanitize HTML, and manage CSS classes with ease.
## โจ Features
### ๐ฆ Installation
### โก Quick start
#### Attribute key normalization
Ensures attribute keys have the correct prefix (like `aria-`, `data-`, or `on`), supporting strings, Enums, and
Stringables.
#### Attribute bag operations
Use `AttributeBag` to query and mutate an attribute array in-place with a minimal API (`get()`, `merge()`,
`remove()`, `set()`, `setMany()`).
#### Universal Stringable support
Pass your domain objects directly to helpers like `Encode`, `Attributes`, or `CSSClass`. The library automatically
handles `__toString()`.
#### Rendering HTML attributes
Use `Attributes::render()` to generate a safe, escaped HTML attribute string from an array. It automatically handles `class` arrays, `style` arrays, and `data-*` expansions.
#### Advanced: DOM & SVG Integration
When working with `DOMDocument`, `SimpleXMLElement`, or other XML/SVG builders, you should not use pre-escaped strings to avoid "double escaping" (for example, `<`).
Use `Attributes::normalizeAttributes()` with `encode: false` to get a flat array of raw values ready for insertion.
#### Managing CSS classes
Allows you to merge, add, or override CSS classes within an attributes array smartly.
#### Encoding
Ensures your content and attribute values are safe from XSS.
#### Enum normalization
Normalizes values against a predefined set, supporting both arrays and Enums.
#### Form naming & IDs
Generates standard PHP form names and valid HTML IDs, handling arrayable and nested properties effortlessly.
#### Template rendering
Performs clean token replacement with normalized line endings.
#### Line break normalization
Collapses multiple line breaks into a single `\n`, useful for cleaning up user input or generated text.
#### Validation
Enforces strict types and approved values for your HTML logic.
## ๐ Documentation
For detailed configuration options and advanced usage.
- ๐ก [Usage Examples](docs/examples.md)
- ๐งช [Testing Guide](docs/testing.md)
## ๐ Package information
[](https://www.php.net/releases/8.3/en.php)
[](https://packagist.org/packages/ui-awesome/html-helper)
[](https://packagist.org/packages/ui-awesome/html-helper)
## ๐ Quality code
[](https://codecov.io/github/ui-awesome/html-helper)
[](https://github.com/ui-awesome/html-helper/actions/workflows/static.yml)
[](https://github.com/ui-awesome/html-helper/actions/workflows/linter.yml)
[](https://github.styleci.io/repos/767410135?branch=main)
## ๐ Our social networks
[](https://x.com/Terabytesoftw)
## ๐ License
[](LICENSE)
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package ui-awesome/html-helper contains the following files
Loading the files please wait ...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.