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.16(2mo ago)040MITBladePHP ^8.1

Since Dec 8Pushed 2mo 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 today

READMEChangelogDependencies (18)Versions (18)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

40

—

FairBetter than 86% of packages

Maintenance85

Actively maintained with recent releases

Popularity8

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

Total

17

Last Release

80d ago

PHP version history (2 changes)v1.0.1PHP &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 (18 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

[livewire/flux

The official UI component library for Livewire.

9527.8M128](/packages/livewire-flux)[filament/support

Core helper methods and foundation code for all Filament packages.

2331.0M244](/packages/filament-support)[tomshaw/electricgrid

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

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

Dynamic tables for models with Laravel Livewire

21259.6k](/packages/ramonrietdijk-livewire-tables)[yajra/laravel-datatables-export

Laravel DataTables Queued Export Plugin.

362.2M4](/packages/yajra-laravel-datatables-export)[asosick/filament-layout-manager

Allow users to create &amp; customize their own FilamentPHP pages composed of Livewire components

5822.2k3](/packages/asosick-filament-layout-manager)

PHPackages © 2026

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