PHPackages                             cakmalik/livewire-generic-table - 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. cakmalik/livewire-generic-table

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

cakmalik/livewire-generic-table
===============================

A reusable and customizable generic table component for Livewire 3.

v1.0.15(1mo ago)032MITBladePHP ^8.1

Since Dec 8Pushed 1mo agoCompare

[ Source](https://github.com/cakmalik/livewire-generic-table)[ Packagist](https://packagist.org/packages/cakmalik/livewire-generic-table)[ RSS](/packages/cakmalik-livewire-generic-table/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (12)Versions (17)Used By (0)

Generic Livewire Table Component
================================

[](#generic-livewire-table-component)

A flexible, Volt-friendly, and fully customizable table component for **Laravel Livewire v3**.
Designed for reusable admin tables with sorting, searching, actions, pagination, and custom column formatting.

---

🚀 Features
----------

[](#-features)

- Works with both **Livewire** and **Livewire Volt**
- Fully customizable column configuration array
- Searchable and sortable columns
- Badge formats with dynamic colors &amp; labels
- Image, badge, datetime, link, and custom renderers
- Row actions with event emission
- Pagination with configurable per‑page options
- Easy integration into any Laravel app or package

---

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require your-vendor/generic-table
```

If using Laravel &lt; 10.21, publish views:

```
php artisan vendor:publish --tag=livewire-generic-table-views
```

---

🧩 Usage
-------

[](#-usage)

### In Blade

[](#in-blade)

```

```

### In Volt

[](#in-volt)

Because Volt does not allow nested arrays inside state, you **must use a computed property**:

```
#[Computed]
public function columns(): array
{
    return [
        [
            'label' => 'Title',
            'field' => 'title',
            'sortable' => true,
            'searchable' => true,
        ],
        [
            'label' => 'Status',
            'field' => 'status',
            'format' => 'badge',
            'badge' => [
                'colors' => [
                    'draft' => 'bg-gray-100 text-gray-700',
                    'published' => 'bg-green-100 text-green-800',
                ],
                'labels' => [
                    'draft' => 'Draft',
                    'published' => 'Published',
                ],
                'default' => 'bg-gray-200 text-gray-900',
                'default_label' => 'Unknown',
            ],
        ],
    ];
}
```

Then use it:

```

```

---

🛠 Column Options
----------------

[](#-column-options)

Each column supports:

KeyDescription`label`Column header text`field`Column data field (supports nested `relation.field`)`sortable`Enable sorting`searchable`Enable keyword searching`format``text`, `image`, `badge`, `datetime`, `custom``badge`Configuration for badge colors &amp; labels`actions`Row action buttons### Example with actions

[](#example-with-actions)

```
[
    'label' => 'Actions',
    'field' => 'actions',
    'actions' => [
        [
            'event' => 'editAction',
            'icon' => 'pencil',
            'color' => 'indigo',
            'variant' => 'primary',
        ],
        [
            'event' => 'deleteAction',
            'icon' => 'trash',
            'color' => 'red',
            'variant' => 'danger',
        ],
    ],
],
```

---

📡 Events
--------

[](#-events)

Your component may listen to row action events:

```
#[On('editAction')]
public function edit($id)
{
    // handle edit
}
```

---

🎨 Custom Styling
----------------

[](#-custom-styling)

You may override the view:

```
php artisan vendor:publish --tag=generic-table-views
```

Then edit:

```
resources/views/vendor/generic-table/generic-table.blade.php

```

---

🤝 Contributing
--------------

[](#-contributing)

Pull requests are welcome!
If you want to improve functionality, fix bugs, or extend features—feel free to contribute.

---

📜 License
---------

[](#-license)

This package is open-sourced under the **MIT License**.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance89

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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 ~7 days

Total

16

Last Release

54d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

v1.0.2PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/10a7b3672a7465722751eed536033282e8933c3bc2107b832d665f3eff458270?d=identicon)[cakmalik](/maintainers/cakmalik)

---

Top Contributors

[![cakmalik](https://avatars.githubusercontent.com/u/48812665?v=4)](https://github.com/cakmalik "cakmalik (17 commits)")

---

Tags

datatablesgridlivewirecomponenttable

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cakmalik-livewire-generic-table/health.svg)

```
[![Health](https://phpackages.com/badges/cakmalik-livewire-generic-table/health.svg)](https://phpackages.com/packages/cakmalik-livewire-generic-table)
```

###  Alternatives

[rappasoft/laravel-livewire-tables

A dynamic table component for Laravel Livewire

2.0k2.7M31](/packages/rappasoft-laravel-livewire-tables)[livewire/flux

The official UI component library for Livewire.

9475.0M86](/packages/livewire-flux)[okipa/laravel-table

Generate tables from Eloquent models.

56752.8k](/packages/okipa-laravel-table)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)[arm092/livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS

2953.8k](/packages/arm092-livewire-datatables)

PHPackages © 2026

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