PHPackages                             inengine/tableui - 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. inengine/tableui

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

inengine/tableui
================

A flexible table ui system for InEngine apps

1.0.3(2mo ago)079[3 issues](https://github.com/InEngine/TableUI/issues)MITPHPPHP ^8.5CI passing

Since May 6Pushed 1w agoCompare

[ Source](https://github.com/InEngine/TableUI)[ Packagist](https://packagist.org/packages/inengine/tableui)[ Docs](https://github.com/inengine/tableui)[ GitHub Sponsors](https://github.com/InEngine)[ RSS](/packages/inengine-tableui/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (4)Dependencies (15)Versions (15)Used By (0)

A flexible table ui system for InEngine apps
============================================

[](#a-flexible-table-ui-system-for-inengine-apps)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d3b4afb0f3b8b5bfb32702ca5961420c902aa4a47d531d7763cc38d953983a30/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e656e67696e652f7461626c6575692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/inengine/tableui)[![GitHub Tests Action Status](https://camo.githubusercontent.com/eb557aefe548ffcab9fd38bbe223c9ad0a45f797626ada27646d06e8b3472b7c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696e656e67696e652f7461626c6575692f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/inengine/tableui/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/2b6887540ada0f059e7803591b29fc169cf89dd42da14f6bc6f776673d2a589f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696e656e67696e652f7461626c6575692f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/inengine/tableui/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/587010ce1c660565f64edaad434be4732465d1cf0e3217aeee2d31f7609e0b35/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e656e67696e652f7461626c6575692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/inengine/tableui)

TableUI is a one-stop package for Laravel and InEngine-based apps for displaying, filtering, and performing actions on data as an interactive table.

Support us
----------

[](#support-us)

If you find this package helpful please consider supporting us.

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

[](#installation)

You can install the package via composer:

```
composer require inengine/tableui
```

You can publish the config file with:

```
php artisan vendor:publish --tag="tableui-config"
```

### Tailwind CSS (v4)

[](#tailwind-css-v4)

**Recommended (host app already uses `@tailwindcss/vite`):** import **`resources/css/tableui.css` only** — it pulls in **`partials/tableui-sources.css`** (`@source` scanning for this package’s Blade views and inline literals), shared base **`[x-cloak]`**, filter-panel **view transitions**, and **`components/tableui-*.css`** (`@layer components` chunks). It **does not** `@import "tailwindcss"` again, so Tailwind is loaded a single time from your app entry (e.g. `base.css`).

```
@import "tailwindcss";
/* …your @source / @theme … */
@import "./../../vendor/inengine/tableui/resources/css/tableui.css";
```

**Optional publish** (copy into your repo):

```
php artisan vendor:publish --tag="tableui-css"
```

```
@import "./vendor/tableui.css"; /* resources/css/vendor/tableui.css */
```

**Standalone bundle:** `resources/css/tableui-standalone.css` imports Tailwind + `tableui.css` and is the **Vite input**for maintainers. Building produces `public/css/tableui.css` for environments that link a precompiled stylesheet instead of merging into the app pipeline:

```
cd vendor/inengine/tableui   # or this package’s root when developing the package
npm install
npm run build
```

Release checklist: run `npm run build` so `public/css/tableui.css` stays up to date for consumers who use the static file.

The config includes:

- **`empty_message`** — default empty-state copy for the Livewire table when no `emptyMessage` prop is passed.
- **`column_types`** — package defaults grouped by column kind. For **`boolean`** you can set **`show_false`** (hide the false-state icon when `false`), plus **`true`** / **`false`** branches, each with:
    - **`icon`** — Heroicons v2 outline slug (e.g. `check`, `x-mark`). Unknown slugs fall back until you extend the icon map.
    - **`color`** — Tailwind text colour for the SVG (`stroke="currentColor"`). Use a shorthand (`green-600` → `text-green-600`), full classes (`text-green-600 dark:text-green-400`), arbitrary values, or your own CSS utility classes.
- **`column_types.id`** — optional **`mono_class`** wrapper + **`ulid_suffix_length`** for shortened ULIDs (see config comments).
- **`column_types.number`** — **`max_decimals`** for non-integer formatting in `NumberColumnRenderer`.
- **`column_types.money`** — **`divisor`** (default `100` for cents), **`decimals`**, **`prefix`**, **`suffix`** for `MoneyColumnRenderer`.
- **`columns`** / **`renderers`** — optional FQCN lists for app-defined column types and renderers (see comments in the published file).

Column inference (when building `Columns` from `Schema::getColumnType()` maps plus sample data) uses the **schema type first** (boolean, id patterns, timestamps, enums, text, **string family**, **numeric family**), then **upgrades** using key + sample within that family — e.g. `string` + `email` + valid address → `EmailColumn`; numeric + monetary name → `MoneyColumn`. Without schema, legacy name/sample heuristics apply. See `ColumnInference` for the full order.

- **`ColumnTypes/`** — `Column`, `ColumnFactory`, plus subfolders:
    - **`Primitives/`** — `BooleanColumn`, `StringColumn`, `TextColumn`, `EnumColumn`, `TimestampColumn`, `NumberColumn`, `IdColumn`
    - **`Complex/`** — `EmailColumn` (extends `StringColumn`), `MoneyColumn` (extends `NumberColumn`), `PhoneColumn` ( extends `StringColumn`)

See `config/tableui.php` in this package for full inline documentation.

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="tableui-views"
```

Usage
-----

[](#usage)

Create a table from an Eloquent collection and render it with the Livewire component:

```
use App\Models\User;
use InEngine\TableUI\Table;

$table = Table::fromCollection(User::query()->latest()->limit(50)->get());
```

```

```

Extending TableUI
-----------------

[](#extending-tableui)

TableUI supports app-level extension points through `config/tableui.php`.

### Custom column types

[](#custom-column-types)

1. Create a column class that extends `InEngine\TableUI\ColumnTypes\Column`.
2. Implement:
    - `InEngine\TableUI\Contracts\BuildsColumnFromAttributeKey`
    - `InEngine\TableUI\Contracts\DefinesColumnRenderers`
3. Register your column and renderer classes in `tableui.columns` and `tableui.renderers`.

```
namespace App\TableUI\Columns;

use InEngine\TableUI\ColumnTypes\Column;
use InEngine\TableUI\Contracts\BuildsColumnFromAttributeKey;
use InEngine\TableUI\Contracts\DefinesColumnRenderers;
use InEngine\TableUI\Contracts\ParticipatesInColumnInference;
use InEngine\TableUI\Rendering\ColumnRendererInterface;

final class SkuColumn extends Column implements BuildsColumnFromAttributeKey, DefinesColumnRenderers, ParticipatesInColumnInference
{
    public static function fromAttributeKey(string $attributeKey): Column
    {
        return new self($attributeKey);
    }

    public static function matchesSample(string $attributeKey, mixed $sample): bool
    {
        return str_contains(strtolower($attributeKey), 'sku');
    }

    /**
     * @return list
     */
    public static function rendererClassNames(): array
    {
        return [SkuColumnRenderer::class];
    }

    /**
     * @return class-string
     */
    public static function defaultRendererClassName(): string
    {
        return SkuColumnRenderer::class;
    }
}
```

```
// config/tableui.php
'columns' => [
    App\TableUI\Columns\SkuColumn::class,
],
'renderers' => [
    App\TableUI\Renderers\SkuColumnRenderer::class,
],
```

### Custom default actions

[](#custom-default-actions)

Add extra default actions for model-backed tables by implementing `InEngine\TableUI\Contracts\BuildsDefaultTableAction`and registering the class in `tableui.actions`.

```
namespace App\TableUI\Actions;

use InEngine\TableUI\ActionTypes\Action;
use InEngine\TableUI\ActionTypes\UpdateAction;
use InEngine\TableUI\Contracts\BuildsDefaultTableAction;
use InEngine\TableUI\Table;

final class ArchiveActionProvider implements BuildsDefaultTableAction
{
    public static function forTable(Table $table): ?Action
    {
        return new UpdateAction(label: 'Archive', target: '/users/{id}/archive');
    }
}
```

```
// config/tableui.php
'actions' => [
    App\TableUI\Actions\ArchiveActionProvider::class,
],
```

### Enum filters (multiselect)

[](#enum-filters-multiselect)

When `tableui.filters.enum_allow_multiple` is `true` (the package default), enum column filters render as a \* *multiselect dropdown*\* (open to pick one or more values; **×** clears; selected options use the table primary color). Rows match if the value is **any** of the selected options (OR). Set to `false` for a classic single ``. You can also set `allowMultiple` on a specific `FilterDefinition` when building filters manually.

### Custom filter definitions

[](#custom-filter-definitions)

Add custom filter mapping for your custom columns by implementing `InEngine\TableUI\Contracts\BuildsFilterDefinitionForColumn` and registering in `tableui.filter_definitions`.

```
namespace App\TableUI\Filters;

use App\TableUI\Columns\SkuColumn;
use InEngine\TableUI\ColumnTypes\Column;
use InEngine\TableUI\Contracts\BuildsFilterDefinitionForColumn;
use InEngine\TableUI\FilterTypes\FilterDefinition;
use InEngine\TableUI\FilterTypes\FilterType;

final class SkuFilterDefinitionProvider implements BuildsFilterDefinitionForColumn
{
    public static function forColumn(Column $column, ?array $enumOptions = null): ?FilterDefinition
    {
        if (! $column instanceof SkuColumn) {
            return null;
        }

        return new FilterDefinition(
            columnKey: $column->key(),
            label: 'SKU',
            type: FilterType::Text,
        );
    }
}
```

```
// config/tableui.php
'filter_definitions' => [
    App\TableUI\Filters\SkuFilterDefinitionProvider::class,
],
```

Pick a **`FilterType`** case that matches how **`TableUiFilterMatcher`** should interpret stored filter values (`Text`, `Email`, `Phone`, `Boolean`, `Enum`, `Number`, `Money`, `Date`, `Datetime`, `Time`). Use **`allowMultiple`** on the definition when you need OR-style enum/text matching beyond the global **`tableui.filters.enum_allow_multiple`** flag.

### Custom Blade views and CSS (UI)

[](#custom-blade-views-and-css-ui)

Use this path when you need different markup, layout hooks, or styling — without forking the package.

**Publish views** (copies into `resources/views/vendor/tableui/`; Laravel resolves these **before** the package copies):

```
php artisan vendor:publish --tag="tableui-views"
```

Typical overrides:

- **`livewire/table.blade.php`** — outer shell, toolbar includes, scroll wrapper.
- **`components/table/*.blade.php`** — thead, body row, toolbar, bulk toolbar, pagination.
- **`components/table/filters/*.blade.php`** — each filter control (text, enum multiselect, range, etc.).

Keep the same Livewire state (`$filterDefinitions`, `$filterValues`, `wire:model` bindings) when you change layout so the PHP side of TableUI continues to hydrate correctly.

**Cell rendering vs Blade:** body cells go through **``**, which delegates to your registered **`ColumnRendererInterface`** classes from **`tableui.renderers`**. Override appearance for a column *type* there; use Blade overrides when you need structural changes around the table (toolbar, filter row, wrappers).

**Publish the CSS entry** (optional — snapshot into your repo if you do not want to reference `vendor/`):

```
php artisan vendor:publish --tag="tableui-css"
```

You still normally **`@import`** the single published **`resources/css/vendor/tableui.css`** after Tailwind in your Vite entry. That file remains the supported contract; internally it **`@import`s** `partials/` and **`components/`** so you can vendor only what you touch (for example copy **`components/tableui-table.css`** into your app and layer overrides after the package import).

**Standalone / CDN stylesheet:** maintainers run **`npm run build`** in this package so **`public/css/tableui.css`** stays in sync for consumers who link the precompiled bundle instead of merging into a Tailwind app pipeline.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [James Johnson](https://github.com/InEngine)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance94

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.8% 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

3

Last Release

64d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e7417da57a74bf0827bb79e987fb6c66c530946ed22c39ec5f175c3a6211a98?d=identicon)[excellentingenuity](/maintainers/excellentingenuity)

---

Top Contributors

[![excellentingenuity](https://avatars.githubusercontent.com/u/1653629?v=4)](https://github.com/excellentingenuity "excellentingenuity (96 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (14 commits)")

---

Tags

laravelInEnginetableui

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/inengine-tableui/health.svg)

```
[![Health](https://phpackages.com/badges/inengine-tableui/health.svg)](https://phpackages.com/packages/inengine-tableui)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.5k](/packages/spatie-laravel-permission)[spatie/laravel-health

Monitor the health of a Laravel application

87912.0M177](/packages/spatie-laravel-health)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M246](/packages/laravel-ai)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.6k](/packages/simplestats-io-laravel-client)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.8k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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