PHPackages                             corrivate/magento2-layout-bricks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. corrivate/magento2-layout-bricks

ActiveMagento2-module[Templating &amp; Views](/categories/templating)

corrivate/magento2-layout-bricks
================================

Use layout bricks in Magento, inspired by Laravel anonymous Blade components

v0.1.1(1y ago)15438MITPHPPHP ~7.4.0||~8.0.0||~8.1.0||~8.2.0||~8.3.0

Since Sep 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/LBannenberg/magento2-layout-bricks)[ Packagist](https://packagist.org/packages/corrivate/magento2-layout-bricks)[ RSS](/packages/corrivate-magento2-layout-bricks/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (5)Versions (6)Used By (0)

Layout Bricks for Magento
=========================

[](#layout-bricks-for-magento)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5c56b64022c220ba1b33fa834f2f394f57736c3a94ce7de3107174faa011d474/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f727269766174652f6d6167656e746f322d6c61796f75742d627269636b733f636f6c6f723d626c7565)](https://packagist.org/packages/corrivate/magento2-layout-bricks)[![MIT Licensed](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)

*All in all you're just another brick in the layout*

```
composer require corrivate/magento2-layout-bricks
```

Modern frontend frameworks embrace reusable components, like buttons, input fields, and cards. And they style them with utility CSS like Tailwind. It's fine to pile a dozen classes on that primary button, because you only have to build it once.

Magento doesn't come with this out of the box. Many templates are *huge* and if you talk about UI components people make the sign of the cross XML at you.

This package is a way to make things better. To use small anonymous components without hassle. It's heavily inspired by Laravel's anonymous blade components. In Magento, our unit of frontend template is a block. An anonymous block is a **brick**.

An example phtml template
-------------------------

[](#an-example-phtml-template)

```
