PHPackages                             indrahulu/laravel-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. indrahulu/laravel-components

ActiveLibrary

indrahulu/laravel-components
============================

Reusable Laravel components

1.0.0(1mo ago)00MITPHPPHP ^8.2

Since Mar 28Pushed 1mo agoCompare

[ Source](https://github.com/indrahulu/laravel-components)[ Packagist](https://packagist.org/packages/indrahulu/laravel-components)[ RSS](/packages/indrahulu-laravel-components/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (1)Used By (0)

indrahulu/laravel-components
============================

[](#indrahulularavel-components)

Reusable Laravel components package.

Quick Start (90 Seconds)
------------------------

[](#quick-start-90-seconds)

1. Publish package assets:

```
php artisan vendor:publish --tag=laravel-components-config
php artisan vendor:publish --tag=laravel-components-views
php artisan vendor:publish --tag=laravel-components-assets
php artisan vendor:publish --tag=laravel-components-theme
php artisan vendor:publish --tag=laravel-components-safelist
php artisan vendor:publish --tag=laravel-components-layouts
```

2. Setup Tailwind integration automatically:

```
php artisan laravel-components:setup-tailwind
```

3. Build frontend assets:

```
npm run build
```

4. Verify integration:

```
php artisan laravel-components:doctor
```

Component Tag
-------------

[](#component-tag)

Use namespaced component tags:

```

```

Reusable Utilities
------------------

[](#reusable-utilities)

This package also provides reusable services/traits:

- `Indrahulu\LaravelComponents\Services\ExceptionService`
- `Indrahulu\LaravelComponents\Services\IndexQueryService`
- `Indrahulu\LaravelComponents\Concerns\HasEnumOptions`
- `Indrahulu\LaravelComponents\Concerns\PreservesIndexState`

Example service injection:

```
use Indrahulu\LaravelComponents\Services\IndexQueryService;

public function index(Request $request, IndexQueryService $indexQueryService): View
{
    $rowsPerPage = $indexQueryService->resolveRowsPerPage($request->query('rows'));

    // ...
}
```

Example enum trait:

```
use Indrahulu\LaravelComponents\Concerns\HasEnumOptions;

enum UserRole: string
{
    use HasEnumOptions;
}
```

Example index state trait:

```
use Indrahulu\LaravelComponents\Concerns\PreservesIndexState;

class UserController extends Controller
{
    use PreservesIndexState;
}
```

Documentation
-------------

[](#documentation)

- Development Guide: `GUIDES.md`
- Docs Index: `docs/index.md`
- Input: `docs/components/input.md`
- Button: `docs/components/button.md`
- Badge: `docs/components/badge.md`
- Card: `docs/components/card.md`
- Checkbox: `docs/components/checkbox.md`
- Link: `docs/components/link.md`
- Modal: `docs/components/modal.md`
- Table Filter: `docs/components/table-filter.md`
- Table Index: `docs/components/table-index.md`
- Textarea: `docs/components/textarea.md`
- Select: `docs/components/select.md`
- Select Remote: `docs/components/select-remote.md`
- Spinner: `docs/components/spinner.md`
- Theme Contract: `docs/theming/theme-contract.md`
- Layout Practical Guide: `docs/layouts/default-customization.md`
- Layout Full Reference: `docs/layouts/default-reference.md`
- Exception Service: `docs/utilities/exception-service.md`
- Index Query Service: `docs/utilities/index-query-service.md`
- Has Enum Options: `docs/utilities/has-enum-options.md`
- Preserves Index State: `docs/utilities/preserves-index-state.md`

Prerequisites
-------------

[](#prerequisites)

- AlpineJS should be available in host app for interactive components.
- Axios should be available globally as `window.axios` for remote components.
- Host app should provide `` (for example via `blade-ui-kit/blade-icons` and the icon set used by the project).
- `IndexQueryService` uses Eloquent query builder (`illuminate/database`).

Theming
-------

[](#theming)

- Active theme is resolved from `config('laravel-components.theme.active')`.
- Theme keys are read from `config('laravel-components.themes.{theme}.tokens|components|behavior')`.
- Full schema and host-contract details are documented in `docs/theming/theme-contract.md`.

Behavior Configuration
----------------------

[](#behavior-configuration)

`IndexQueryService::resolveRowsPerPage()` reads:

- `laravel-components.utilities.index.rows_per_page.options`
- `laravel-components.utilities.index.rows_per_page.default`

Example:

```
'utilities' => [
    'index' => [
        'rows_per_page' => [
            'options' => [10, 25, 50, 100],
            'default' => 25,
        ],
    ],
],
```

Command Helpers
---------------

[](#command-helpers)

- `php artisan laravel-components:setup-tailwind`
    - Injects required `@import` and `@source` lines into host CSS entry file.
- `php artisan laravel-components:doctor`
    - Checks config/theme/safelist/app.css integration and reports `OK/WARN/FAIL`.
- `php artisan laravel-components:generate-safelist`
    - Regenerates safelist entries from active theme config.

Agent Skill
-----------

[](#agent-skill)

Publish skill template:

```
php artisan vendor:publish --tag=laravel-components-skill
```

Published file:

- `docs/vendor/laravel-components/skills/laravel-components-development/SKILL.md`

Install to Codex skills directory:

1. Create target folder: `~/.codex/skills/laravel-components-development`
2. Copy published `SKILL.md` into that folder.

Skill reference is doc-driven and points to:

- `docs/index.md`
- `docs/components/*`
- `docs/theming/theme-contract.md`
- `docs/layouts/*`
- `docs/utilities/*`
- `docs/skills/installation.md`

Publish Assets
--------------

[](#publish-assets)

```
php artisan vendor:publish --tag=laravel-components-config
php artisan vendor:publish --tag=laravel-components-views
php artisan vendor:publish --tag=laravel-components-assets
php artisan vendor:publish --tag=laravel-components-theme
php artisan vendor:publish --tag=laravel-components-safelist
php artisan vendor:publish --tag=laravel-components-layouts
php artisan vendor:publish --tag=laravel-components-skill
php artisan vendor:publish --tag=laravel-components-docs
```

Starter Layout
--------------

[](#starter-layout)

Publish starter layout:

```
php artisan vendor:publish --tag=laravel-components-layouts
```

Published file:

- `resources/views/layout/default.blade.php`

Then use in pages:

```
@extends('layout.default')
```

Customization guides:

- `docs/layouts/default-customization.md`
- `docs/layouts/default-reference.md`

Tailwind Source and Safelist (Host App)
---------------------------------------

[](#tailwind-source-and-safelist-host-app)

In host app `resources/css/app.css`:

```
@import './vendor/laravel-components-theme.css';

@source '../../vendor/indrahulu/laravel-components/resources/views/**/*.blade.php';
@source './safelist/laravel-components.txt';
```

For local path/submodule usage, point `@source` to local package views path instead of `vendor/...`.

Troubleshooting
---------------

[](#troubleshooting)

- Components render but look unstyled:
    - Ensure `@import './vendor/laravel-components-theme.css';` exists in `resources/css/app.css`.
    - Ensure `@source` lines for package views and safelist exist in `resources/css/app.css`.
    - Ensure published files exist:
        - `resources/css/vendor/laravel-components-theme.css`
        - `resources/css/safelist/laravel-components.txt`
    - Re-run `npm run build` (or `npm run dev` for local development).
    - Run `php artisan laravel-components:doctor` and follow warnings.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

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

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3817824fcd788e00b81a3b69d8d6f7f40aeeaba1518cc7e9d94e416f9782b6df?d=identicon)[indrahulu](/maintainers/indrahulu)

---

Top Contributors

[![indrahulu](https://avatars.githubusercontent.com/u/13730876?v=4)](https://github.com/indrahulu "indrahulu (47 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[livewire-filemanager/filemanager

A simple, friendly and practical Livewire filemanager for your applications

3587.6k1](/packages/livewire-filemanager-filemanager)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)

PHPackages © 2026

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