stevebauman/hypertext
Hypertext is a Laravel package for building HTML with PHP objects. Define reusable components as classes, compose them with slots and attributes, and render clean markup without template files—an object-oriented alternative to Blade for dynamic UI.
Architecture fit
Htmlable, so output flows through Blade's {{ }} without double escaping. Fits Laravel monoliths and modular Laravel apps; not framework-agnostic, so it does not travel to Symfony, standalone PHP, or non-Laravel services.Integration feasibility
composer require, no config publishing, no migrations, no database surface, no queue/event hooks. Adoption can be scoped to a single view, mail class, or component without touching the rest of the app.{{ $element }}), so existing layouts, slots, and @include behavior remain intact; a pilot can be evaluated inside a sprint without an architectural decision.Technical risk
style, on*, data-*), void elements, and raw-HTML opt-outs must be validated independently before trusting it in user-facing surfaces.Key questions
@aware, passing Hypertext output into Blade components and vice versa.Stack fit
Htmlable.Migration path
App\Html\Components namespace owning all reusable element builders, so usage does not fragment into ad-hoc static helper calls.Compatibility
spatie/laravel-html-style packages, but avoid mixing two HTML-builder libraries in one codebase — pick one and document it.{{ $element }} is correct, {!! !!} around Hypertext output silently defeats the escaping guarantee.Sequencing
assertSee, element-tree assertions).Maintenance
Support
Scaling
Failure modes
Ramp-up
How can I help you explore Laravel packages today?