Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Blade X Laravel Package

spatie/laravel-blade-x

Blade-X brings Blade-style HTML components to Laravel 6 and below, letting you use tags like instead of @include. Package is abandoned because Laravel 7+ has native Blade components; migrate when upgrading.

View on GitHub
Deep Wiki
Context7

title: Introduction weight: 1

Notice

We have abandoned this package because Laravel 7 introduced native support for Blade-X style components.

Only use this package if you're on Laravel 6 or below.

When upgrading to Laravel 7 you should convert your Blade X components to native Laravel Blade components

Introduction

This package provides an easy way to render custom HTML components in your Blade views.

Instead of this:

<h1>My view</h1>

[@include](https://github.com/include)('myAlert', ['type' => 'error', 'message' => $message])

you can write this

<h1>My view</h1>

<my-alert type="error" :message="$message" />

You can place the content of that alert in a simple blade view that needs to be registered before using the my-alert component.

{{-- resources/views/components/myAlert.blade.php --}}

<div class="{{ $type }}">
   {{ $message }}
</div>

A note on performance

Because our package operates before Blade compiles views there is no performance penalty. Blade can just cache all views.

Because all the transformations are done serverside, there are no interop problems with a clientside framework such as Vue or React.

For more information on how the transformation is done, checkout the "From BladeX to Blade" section.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport