https://github.com/octoper/statamic-blade-components
A Laravel Blade templates integration for Statamics Antlers engine.
https://github.com/octoper/statamic-blade-components
Last synced: 8 months ago
JSON representation
A Laravel Blade templates integration for Statamics Antlers engine.
- Host: GitHub
- URL: https://github.com/octoper/statamic-blade-components
- Owner: octoper
- License: mit
- Created: 2020-08-26T03:55:36.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-03-04T09:22:59.000Z (over 2 years ago)
- Last Synced: 2025-03-31T08:38:52.193Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 43 KB
- Stars: 10
- Watchers: 4
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Statamic Blade Components
> **Looking for maintainers**: As I'm not using Statamic these days and I don't have a the time to maintain the package I'm looking for anyone who want to take the ownerhip of it! You can reach out via email me@octoper.me
[](https://statamic.com/addons/octoper/blade-components)
[](https://packagist.org/packages/octoper/statamic-blade-components)
[](https://github.com/octoper/statamic-blade-components/actions/workflows/tests.yaml)
[](https://github.styleci.io/repos/290389800?branch=main)
A [Laravel Blade Components](https://laravel.com/docs/10.x/blade#components) integration for Statamics Antlers template engine.
## Installation
You can install the package via composer:
```bash
composer require octoper/statamic-blade-components
```
## General documentation
[Laravel Blade Components](https://laravel.com/docs/10.x/blade#components)
## How to be used with the Antlers template engine
```html
{{ component:hello }}
```
### Passing Initial Parameters
You can pass data into a component by passing additional parameters
```html
{{ component:avatar username="johndoe" }}
```
### Passing Slots
You can pass additional content to your component via "slots" too.
```html
{{ component:label for="email" }}
Email
{{ /component:label }}
```
or even named slots
```html
{{ component:label for="email" }}
{{ component:slot name="title" }}
Email
{{ /component:slot}}
{{ /component:label }}
```
## Testing
``` bash
composer test
```
## Security
If you discover any security related issues, please email me@octoper.me instead of using the issue tracker.
## Credits
- [Vaggelis Yfantis](https://github.com/octoper)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.