EN FR
← Packages

jdz/ui

Shared UI display layer (image thumbnails, HTML helpers) extended by frontui and adminui

Overview

The shared UI display layer both jdz/frontui and jdz/adminui extend. No framework, no Twig, no dependency beyond PHP 8.2 — the pieces of HTML output that are identical whether they land on a public page or in a back-office list.

Features

  • Html\Image — <img> builder with on-demand GD thumbnails (width-constrained, cached under public/thumbs/), native lazy-loading, portrait/landscape orientation hint, missing-source fallback and opt-in data-zoom
  • Html\Attributes — parse / merge HTML tag attribute strings
  • Html\Helper — abstract WYSIWYG content sanitiser (tag whitelist, French typography, DOM tidy) with cleanBlocks() / cleanLinks() subclass hooks
  • data-src pairs with a lazy loader (jizy-front / lozad swaps the thumb for the original), data-zoom with a picture viewer — both inert without JS

Installation

composer require jdz/ui