PHPackages                             stillat/antlers-components - 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. stillat/antlers-components

ActiveLibrary[Templating &amp; Views](/categories/templating)

stillat/antlers-components
==========================

v2.8.0(2mo ago)2656.0k↓19%5[1 PRs](https://github.com/Stillat/antlers-components/pulls)1PHPPHP ^8.1CI passing

Since Mar 3Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/Stillat/antlers-components)[ Packagist](https://packagist.org/packages/stillat/antlers-components)[ GitHub Sponsors](https://github.com/johnathonkoster)[ RSS](/packages/stillat-antlers-components/feed)WikiDiscussions main-v2 Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (20)Used By (1)

[![Antlers Components](.art/banner.png)](.art/banner.png)

Antlers Components is a Statamic addon that makes creating isolated, reusable Antlers partials easy and integrating existing Blade and Livewire components a breeze using a familiar syntax.

Installation
------------

[](#installation)

You may install Antlers Components using composer:

```
composer require stillat/antlers-components
```

Requirements
------------

[](#requirements)

Antlers Components requires at least PHP 8.1 and:

- Statamic version `3.4.*` or higher
- Laravel `9.36` or higher

This package provides a familiar syntax for Livewire components, and it is compiled into the Antlers tags provided by this package:

In order to use the Livewire/Flux syntax, you will also need to install it using the following command:

```
composer require marcorieser/statamic-livewire
```

For support/reporting issues related to the Livewire functionality beyond compilation errors, please use the following GitHub link:

Using Blade Components
----------------------

[](#using-blade-components)

You may use Blade Components within your Antlers template using the syntax you are familiar with.

For example, to include a `card` Blade component we may use the `` syntax. This package supports Blade component slots; you may use Antlers within the slot:

```
{{ collection:articles }}

            {{ title }}

        {{ content | safe_truncate(120) }}

            ...

{{ /collection:articles }}
```

Using Antlers inside parameter values is acceptable.

Livewire Components
-------------------

[](#livewire-components)

We can integrate existing Livewire components in our Antlers templates using the `` syntax like so:

```
{{ collection:articles }}

{{ /collection:articles }}
```

Flux Components
---------------

[](#flux-components)

If you'd like to use [Flux](https://fluxui.dev/) components, ensure you've also installed the Livewire addon.

### Flux v1 Styles and Scripts

[](#flux-v1-styles-and-scripts)

Once you have Livewire and Flux installed in your site, you can use the `flux` tag to add the required styles and scripts to your layout:

```

    {{ flux:styles /}}

    {{ template_content /}}

    {{ flux:scripts /}}

```

You may now use Flux components directly within your Antlers templates (or within your Livewire components if you are using Antlers for those).

### Flux v2 Styles and Scripts

[](#flux-v2-styles-and-scripts)

Once you have Livewire and Flux installed in your site, you can use the `flux` tag to add the required styles and scripts to your layout:

```

    {{ flux:appearance /}}

    {{ template_content /}}

    {{ flux:scripts /}}

```

You may now use Flux components directly within your Antlers templates (or within your Livewire components if you are using Antlers for those).

Supported Parameter Types
-------------------------

[](#supported-parameter-types)

This package supports the following parameter types when compiling component tags to Antlers:

**Shorthand Variables**:

```
{{ title = 'The title'; }}

```

**Variable References**:

```
{{ title = 'The title'; }}

```

**Name/Value**:

```
{{ title = 'The title'; }}

```

**Attribute**:

```

```

Antlers Components
------------------

[](#antlers-components)

This package also supports the concept of Antlers "components", which are really just syntax sugar on top of partials (with a few special behaviors).

As an example, we could include a partial named `partial-name.antlers.html` using this library like so:

```

```

**Very Important**: When using this syntax, the partials **will not** inherit the scope they were included in (except for the general Cascade). This means that if we want current data to be supplied to our partial, we must explicitly pass it in via. parameters.

The behavior of slots is also slightly different when using this syntax, and is closer to anonymous Blade components.

Let us consider an Antlers partial named `_card.antlers.html`:

```

        {{ title }}

    {{ slot }}

        {{ footer }}

```

we can render this Antlers partial in our main template like so:

```
{{ collection:articles }}

        {{ title }}
        ...

        {{ content | safe_truncate(120) }}

{{ /collection:articles }}
```

> Note: We have to explicitly allow the current article's title and content values by supplying them via. parameters. Without this, it will default to the current page's values.

When using this syntax, we do not need to prefix named slots with `slot:` inside our partial. Additionally, we also have access to an attributes bag. Parameters supplied to named slots will be available within the partial, as well:

```
{{ collection:articles }}

        {{ title }}
        ...

        {{ content | safe_truncate(120) }}

{{ /collection:articles }}
```

### Nesting Antlers Component Partials

[](#nesting-antlers-component-partials)

We may also nest partial components by including them within other components. Like with regular components, we must specify what values we want to be passed along to our nested components:

```

```

We can check if we are inside a nested/child component using the `__is_nested` variable:

```
{{ if __is_nested }}
    I am a nested partial.
{{ else }}
    I am not nested.
{{ /if }}
```

We can also see how deeply nested we are using the `__depth` variable:

```
The current nested partial depth is: {{ __depth }}.
```

And finally, we may access data from the parent partial if we are nested by referencing the `__parent` variable:

```
{{ __parent.title }}
```

If that parent has a parent, we can keep on going:

```
{{ __parent.__parent.title }}
```

License
-------

[](#license)

This addon is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance85

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 95.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~109 days

Recently: every ~114 days

Total

11

Last Release

79d ago

Major Versions

v1.0.1 → v2.0.02023-05-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/a83ab8381df8c78dbe4acc582ab8b0c0202dfa5f59a4c837b32d78a2bafc0fe7?d=identicon)[stillat](/maintainers/stillat)

---

Top Contributors

[![JohnathonKoster](https://avatars.githubusercontent.com/u/5232890?v=4)](https://github.com/JohnathonKoster "JohnathonKoster (46 commits)")[![aerni](https://avatars.githubusercontent.com/u/23167701?v=4)](https://github.com/aerni "aerni (1 commits)")[![sheldonkotyk](https://avatars.githubusercontent.com/u/622598?v=4)](https://github.com/sheldonkotyk "sheldonkotyk (1 commits)")

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/stillat-antlers-components/health.svg)

```
[![Health](https://phpackages.com/badges/stillat-antlers-components/health.svg)](https://phpackages.com/packages/stillat-antlers-components)
```

###  Alternatives

[cagilo/cagilo

A set of open-source Blade components for the Laravel Framework

172996.5k](/packages/cagilo-cagilo)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)[spatie/laravel-blade-comments

Add debug comments to your rendered output

177325.5k](/packages/spatie-laravel-blade-comments)[orchid/blade-icons

An easy way inline SVG images in your Blade templates.

223.4M9](/packages/orchid-blade-icons)[wireui/heroicons

The Tailwind Heroicons for laravel blade by WireUI

43390.8k5](/packages/wireui-heroicons)[itstructure/laravel-grid-view

Grid view for laravel framework

2546.6k2](/packages/itstructure-laravel-grid-view)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
