Download the PHP package trk/sulu-preline-blocks-bundle without Composer

On this page you can find all versions of the php package trk/sulu-preline-blocks-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

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.
Please rate this library. Is it a good library?

Informations about the package sulu-preline-blocks-bundle

Sulu Preline Blocks Bundle

Latest Version PHP Version Sulu CMS Symfony Preline UI Tailwind CSS PHPStan

An enterprise-grade, accessible, and fully customizable Preline UI 5 & Tailwind CSS 4 component library bundle for Sulu CMS 3.x / 2.5+, powered by Symfony UX Twig Components and trk/sulu-block-suite-bundle.


Table of Contents


Overview & Philosophy

Modern CMS websites often suffer from tight coupling: hardcoded HTML in page templates, scattered CSS utilities, and rigid admin block schemas.

SuluPrelineBlocksBundle solves this by introducing a decoupled, 3-tier architecture:

Zero Hardcoding Guarantee

  1. Never hardcode markup: Block templates delegate directly to Twig Components (<twig:Card ... />).
  2. Never hardcode styles: Visual styling is driven by structured YAML prop schemas, customizable via the visual admin modal.
  3. 100% Overridable: Every XML block structure, Twig template, prop schema, and preset can be overridden in the host application without modifying vendor code.

Key Features


Core Blocks

Block Description Interactive Features
Card Feature cards, blog cards, profile cards, product cards Media banner, badges, hover zoom, multiple buttons, icon cards
Headline Semantic headings (h1-h6, div, span) Visual style scaling, accent badges, alignments, letter spacing
Text Rich text & lead paragraphs Multi-column layouts, lead styles, line-height, text colors
Alert Accessible notification callouts Dismiss button (data-hs-remove-element), 5 semantic variants, soft/outline styles
Button CTAs, links, and action buttons 8 visual variants, icons, rounded-full, pill, sizes (xs-xl)
Divider Section separators Solid, dashed, dotted, gradients, embedded text/icons
Image Single and gallery images Aspect ratios, lazy loading, lightbox triggers, hover zoom
Video Responsive video players YouTube/Vimeo embeds, HTML5 video, autoplay, controls, modal trigger
Overlay Full-featured modals and drawers Preline data-hs-overlay, backdrop blur, size controls, customizable actions

Requirements


Installation

1. Composer Package

2. Register the Bundle

In config/bundles.php:

3. Tailwind CSS 4 Configuration

In your website's main stylesheet (e.g. assets/website/src/app.css):

4. Preline UI JavaScript Setup

In your frontend entry point (e.g. assets/website/src/app.js):

5. Enable Blocks in Page Templates

  1. Reference the bundle's blocks in your page XML or include file (e.g. config/templates/includes/blocks.xml):

  2. Render the blocks in your page template (e.g. templates/pages/default.html.twig):

The bundle's block templates automatically resolve styling props, merge presets, and render the underlying accessible Twig Components (<twig:Card ... />, <twig:Button ... />, etc.).


Architecture & Override Mechanics

1. Overriding Block XML Structures

Sulu automatically checks the host application's config/templates/blocks/ directory before consulting bundle directories. To customize any block's admin fields, place an XML file with the same name in your project:

2. Overriding Prop Schemas & Defining Presets

SuluPrelineBlocksBundle provides the foundational prop schemas in config/blocks/props/ and deliberately contains no presets. Presets are 100% project-driven:

3. Overriding Twig Components & HTML

To override the HTML markup of any component:

4. Creating Custom Project Blocks

Adding a brand-specific block (e.g. hero) is straightforward:

  1. Create config/templates/blocks/hero.xml.
  2. Add <type ref="hero"/> to your config/templates/includes/blocks.xml.
  3. Create templates/blocks/hero.html.twig or <twig:Hero ... />.
  4. (Optional) Create config/blocks/props/hero.yaml and config/blocks/presets/hero.yaml for visual styling in the Sulu modal!

Sulu Live Preview Integration

Preline UI relies on DOM attributes to initialize collapses, modals, dropdowns, and accordions. Because Sulu CMS Live Preview updates the page dynamically via iframe messages, window.HSStaticMethods.autoInit() is required to re-bind interactive behaviors.

The bundle's included templates and components are designed to re-initialize seamlessly without memory leaks or duplicate event listeners.


Testing & Quality Assurance

SuluPrelineBlocksBundle is tested against a rigorous quality matrix:

CI workflows automatically execute the test suite across PHP 8.2, 8.3, 8.4, and 8.5 on every commit and pull request.


License

This bundle is open-source software licensed under the MIT License.


All versions of sulu-preline-blocks-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
sulu/sulu Version ^3.0
symfony/config Version ^7.0
symfony/dependency-injection Version ^7.0
symfony/form Version ^7.0
symfony/http-kernel Version ^7.0
symfony/ux-twig-component Version ^2.13 || ^3.0
trk/sulu-block-suite-bundle Version ^0.2
twig/twig Version ^3.0
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 trk/sulu-preline-blocks-bundle contains the following files

Loading the files please wait ...