Welcome to the official documentation for the Hypertool HTML Generator library!
This library provides a powerful, flexible, and fluent PHP interface for generating HTML, with first-class support for modern frontend techniques using HTMX and Hyperscript.
π Getting Started
New to the library? Hereβs how to get up and running quickly:
- Installation: Follow the Composer installation instructions in the main project README.
- Basic Usage: Check out the basic usage examples to see how to create elements.
- Framework Integration: See examples for HTMX & Hyperscript and the Automated Script Injection system.
- Run Examples: Explore the runnable code examples in the
../examples/
directory.
π Core Class Documentation
Dive deeper into the main components of the library:
HtmlElement
: The core class for creating and manipulating all HTML elements. Learn about its API, attribute setters, child management, and HTMX/Hyperscript integration.
ScriptManager
: Understand how to use the automated system for injecting htmx.js
and hyperscript.js
conditionally and efficiently into your layouts.
β¨ Key Features
- β
Full HTML Coverage: Classes and factories for all HTML5 & deprecated elements.
- π Fluent Interface: Chain methods for cleaner code (
->setId()->setClass()->...
).
- β‘ HTMX & Hyperscript Ready: Dedicated setters for
hx-*
and _
attributes.
- βοΈ Smart Script Loading: Automated, conditional, environment-aware script injection via
ScriptManager
.
- 𧩠Composer Ready: Easily integrate into your projects with PSR-4 autoloading.
- π Well Documented: Comprehensive class documentation and usage examples.
π€ Contributing
Found a bug or have an idea? We welcome contributions!
π Useful Links
Welcome to the official documentation for the Hypertool HTML Generator library!
This library provides a powerful, flexible, and fluent PHP interface for generating HTML, with first-class support for modern frontend techniques using HTMX and Hyperscript.
π Getting Started
New to the library? Hereβs how to get up and running quickly:
- Installation: Follow the Composer installation instructions in the main project README.
- Basic Usage: Check out the basic usage examples to see how to create elements.
- Framework Integration: See examples for HTMX & Hyperscript and the Automated Script Injection system.
- Run Examples: Explore the runnable code examples in the
../examples/
directory.
π Core Class Documentation
Dive deeper into the main components of the library:
HtmlElement
: The core class for creating and manipulating all HTML elements. Learn about its API, attribute setters, child management, and HTMX/Hyperscript integration.
ScriptManager
: Understand how to use the automated system for injecting htmx.js
and hyperscript.js
conditionally and efficiently into your layouts.
β¨ Key Features
- β
Full HTML Coverage: Classes and factories for all HTML5 & deprecated elements.
- π Fluent Interface: Chain methods for cleaner code (
->setId()->setClass()->...
).
- β‘ HTMX & Hyperscript Ready: Dedicated setters for
hx-*
and _
attributes.
- βοΈ Smart Script Loading: Automated, conditional, environment-aware script injection via
ScriptManager
.
- 𧩠Composer Ready: Easily integrate into your projects with PSR-4 autoloading.
- π Well Documented: Comprehensive class documentation and usage examples.
π€ Contributing
Found a bug or have an idea? We welcome contributions!
π Useful Links