PHPackages                             antonioprimera/laravel-site-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. antonioprimera/laravel-site-components

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

antonioprimera/laravel-site-components
======================================

Useful reusable components for laravel sites

v1.1.2(1y ago)018MITPHPPHP ^8.2

Since Aug 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AntonioPrimera/laravel-site-components)[ Packagist](https://packagist.org/packages/antonioprimera/laravel-site-components)[ Docs](https://github.com/antonioprimera/laravel-site-components)[ GitHub Sponsors](https://github.com/antonioprimera)[ RSS](/packages/antonioprimera-laravel-site-components/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (11)Versions (7)Used By (0)

Useful reusable components for laravel sites
============================================

[](#useful-reusable-components-for-laravel-sites)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8a21e05c98e422d72a3cdd0a5e6e76c73d700646d711291526681d92fa353d22/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e746f6e696f7072696d6572612f6c61726176656c2d736974652d636f6d706f6e656e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/antonioprimera/laravel-site-components)

This package provides a set of useful reusable components for laravel sites, based on the [antonioprimera/larave-site](https://github.com/AntonioPrimera/laravel-site) package.

The laravel-site package introduces the Site, Page, Section and Bit models, which hold the contents of a site. The laravel-site package is view agnostic, and only provides abstract view component classes, used to build concrete view components.

This package provides some useful prebuilt components, that you can use in your site.

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

[](#installation)

You can install the package via composer:

```
composer require antonioprimera/laravel-site-components
```

Scaffolding commands
--------------------

[](#scaffolding-commands)

### Scaffold the layout

[](#scaffold-the-layout)

You can scaffold the layout components by running the following command:

```
php artisan site-components:layout
```

This will generate the following View Components: `OuterLayout`, `GuestLayout`, `GuestNav` and the css file for the guest nav.

Prebuilt components
-------------------

[](#prebuilt-components)

The package provides a set of prebuilt components that you can use in your site. The prebuilt components are focused on handling the rendering of sections and bits (see the [antonioprimera/larave-site](https://github.com/AntonioPrimera/laravel-site) package for more information on sections and bits).

### SectionContainer

[](#sectioncontainer)

This is a simple container component, providing a responsive layout for sections, with a max width and some horizontal padding. It does not have any props. It comes with some default tailwind classes for styling, but you can override the styling by creating a 'section-container' class in your css.

```

```

### SectionTitle

[](#sectiontitle)

This is a title component for a section, rendering a heading tag with the section title. The component has no styling. You can style it, by defining a 'section-title' class in your css.

Props:

- title (string): the title of the section (optional) (at least one of title or section must be provided)
- section (Section): the section model instance (optional) (the section has precedence over the string title)
- level (int|string): the heading level (default: 2)

```

```

### Image

[](#image)

This is an image component, rendering a responsive spatie media model. The component accepts a media model, a section model or a bit model as a prop. The component has no styling. You can style it, by defining a 'site-image' class in your css. If the media model is not provided, the component will render a placeholder svg image.

Props:

- media (Media): the media model instance (optional) (at least one of media, section or bit must be provided)
- section (Section): the section model instance (optional) (the image of the section will be rendered - if any)
- bit (Bit): the bit model instance (optional) (the image of the bit will be rendered - if any)

```

```

### Nav

[](#nav)

This is a basic navigation component, rendering a responsive site nav bar. The component accepts a NavItemCollection as a prop (a collection of NavItem instances). The component has some basic styling, but you can style it, by publishing the css file and overriding the default styles.

Props:

- items (NavItemCollection|array): a collection of `AntonioPrimera\SiteComponents\ViewModels\NavItem` instances

Alternatively, you can inherit the Nav component class and override the navItems() method, to provide the navigation items for the nav bar.

```

```

Contributing
------------

[](#contributing)

Feel free to contribute to this package by creating a pull request. Just please keep in mind the following guidelines:

- Follow the Laravel coding style
- Write tests for your code (if applicable) and make sure they pass
- Document your code and update the README.md file
- Keep the package simple and focused on the main goal: providing reusable components for laravel websites

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~2 days

Total

6

Last Release

613d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/77cac31fc31444fb45ef19e3628a7b243b5456679a9e6db635aa3b979bfdbefc?d=identicon)[AntonioPrimera](/maintainers/AntonioPrimera)

---

Top Contributors

[![AntonioPrimera](https://avatars.githubusercontent.com/u/23128666?v=4)](https://github.com/AntonioPrimera "AntonioPrimera (12 commits)")

---

Tags

laravelantonioprimeralaravel-site-components

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/antonioprimera-laravel-site-components/health.svg)

```
[![Health](https://phpackages.com/badges/antonioprimera-laravel-site-components/health.svg)](https://phpackages.com/packages/antonioprimera-laravel-site-components)
```

###  Alternatives

[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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