klan1/k1lib.html

HTML components for k1lib

Maintainers

Package info

github.com/klan1/k1lib.html

pkg:composer/klan1/k1lib.html

Statistics

Installs: 1

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2026-04-29 05:18 UTC

This package is auto-updated.

Last update: 2026-04-29 05:19:45 UTC


README

A comprehensive PHP library for generating HTML documents and components using an object-oriented approach. This package is a modular extraction of the HTML generation tools from the main k1lib library.

Features

  • DOM-like Structure: Create HTML documents by nesting objects, mirroring the natural structure of HTML.

  • Comprehensive Tag Support: Dedicated classes for almost all standard HTML tags (div, table, form, input, p, etc.). Recently expanded to include full Semantic Layout, Text Formatting, Table and List tags.

  • Framework Integrations: Built-in support for Bootstrap specialized components and methods for layouts.

  • Flexible Attributes: Easily set and modify HTML attributes through a fluent API.

  • Component-Based: Includes reusable components like accordions, modals, and grids.

Installation

Install via Composer:

composer require klan1/k1lib.html

Quick Start

use k1lib\html\html_document;
use k1lib\html\body;
use k1lib\html\div;

$doc = new html_document();
$body = $doc->append_body();
$div = $body->append_div("main-container");
$div->set_value("Hello, k1lib.html!");

echo $doc->generate();

License

This project is licensed under the Apache-2.0 License.

Alejandro Trujillo Jiménez Klan1 Labs - R&D Team Website: klan1.com