PHPackages                             unexpectedjourney/filament-toolbox - 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. unexpectedjourney/filament-toolbox

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

unexpectedjourney/filament-toolbox
==================================

A collection of Filament components.

v1.0.3(2y ago)09[2 PRs](https://github.com/rhiannonjourney/filament-toolbox/pulls)MITPHPPHP ^8.1

Since Oct 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rhiannonjourney/filament-toolbox)[ Packagist](https://packagist.org/packages/unexpectedjourney/filament-toolbox)[ Docs](https://github.com/unexpectedjourney/filament-toolbox)[ GitHub Sponsors](https://github.com/unexpectedjourney)[ RSS](/packages/unexpectedjourney-filament-toolbox/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (14)Versions (9)Used By (0)

Filament Toolbox
================

[](#filament-toolbox)

[![Latest Version on Packagist](https://camo.githubusercontent.com/85676370fe0e313757ef0f842ec142cb5f8657b89f0c7ef72d97da225fb2dfa1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f756e65787065637465646a6f75726e65792f66696c616d656e742d746f6f6c626f782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/unexpectedjourney/filament-toolbox)[![GitHub Tests Action Status](https://camo.githubusercontent.com/e8d57114eba984d550a21f7af734fefc337b21c5b260f2038212bb9ce987601c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f756e65787065637465646a6f75726e65792f66696c616d656e742d746f6f6c626f782f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/unexpectedjourney/filament-toolbox/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/973272cd7b79555b7156f361604117ee2cf4df9e0a9454cf5066a4766757d58e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f756e65787065637465646a6f75726e65792f66696c616d656e742d746f6f6c626f782f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/unexpectedjourney/filament-toolbox/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/5f8507c56b67d31aec74161c02d00c1017bf011a619de5704a7f7b6ad5564401/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f756e65787065637465646a6f75726e65792f66696c616d656e742d746f6f6c626f782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/unexpectedjourney/filament-toolbox)

Filament Toolbox is a collection of components for the Filament ecosystem.

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

[](#installation)

You can install the package via composer:

```
composer require unexpectedjourney/filament-toolbox
```

Components
----------

[](#components)

- Table Columns
    - Heading and Detail Column
    - Flag Column

### Heading and Detail Column

[](#heading-and-detail-column)

[![Heading and Detail Column example](documentation/img/heading-detail-column.png)](documentation/img/heading-detail-column.png)

The Heading and Detail Column is a way to display two separate values in the same column. This can be done natively in Filament with a `TextColumn` and `description()` but it lacks some features like built in limiting of the detail and automatic tooltips when either the heading or detail is limited.

#### Usage

[](#usage)

Create a `HeadingDetailColumn` just like you would a `TextColumn` and chain a call to `detail()` to provide the detail contents.

```
use UnexpectedJourney\FilamentToolbox\Tables\Columns\HeadingDetailColumn;

HeadingDetailColumn::make('sku')
    ->detail(fn(Product $record): string => $record->name)
```

To control exactly what content shows in the heading you may use the `heading()` method.

```
use UnexpectedJourney\FilamentToolbox\Tables\Columns\HeadingDetailColumn;

HeadingDetailColumn::make('sku')
    ->heading(fn(Product $record): string => str($record->sku)->upper())
    ->detail(fn(Product $record): string => $record->name)
```

Use the `limit()` or `words()` methods to apply a limit to the number or characters or words displayed in both the heading and detail. The column detects when the limit is applied and adds a Tooltip with the full content when necessary.

```
HeadingDetailColumn::make('sku')
    ->detail(fn(Product $record): string => $record->name)
    ->limit(30)
```

Use the `limitHeading()`, `wordsHeading()`, `limitDetail()`, and `wordsDetail()` methods to limit the number of characters or words displayed in the heading or detail separately. Tooltips will be intelligently added as needed.

```
HeadingDetailColumn::make('sku')
    ->detail(fn(Product $record): string => $record->name)
    ->limitHeading(100)
    ->limitDetail(30)
```

If you do not want tooltips displayed you can disable them using the `showTooltipsWhenLimited()` to handle display for tooltips for both the heading and detail or by using `showHeadingTooltipWhenLimited()` and `showDetailTooltipWhenLimited()` methods to manage tooltips for the heading and detail respectively.

```
HeadingDetailColumn::make('sku')
    ->detail(fn(Product $record): string => $record->name)
    ->showTooltipsWhenLimited(false)
    ->limitDetail(30)
```

### Flag Column

[](#flag-column)

[![Heading and Detail Column example](documentation/img/flag-column.png)](documentation/img/flag-column.png)

The Flag column is used to display boolean icons for a number of true/false values on your model. Similar results can be had using Filament's built in `IconColumn` but the Flag Column has some extra features like tooltips or urls for each icon and displaying the icons in a grid.

#### Usage

[](#usage-1)

##### Preparing your model

[](#preparing-your-model)

Your model needs an attribute that returns an array where the keys are the name of the flag and the values are the active state. This can be a JSON column or a custom Attribute getter.

##### Add the column

[](#add-the-column)

Add the `FlagColumn` to your columns array and call `flags()` passing an array of `Flag`s to it. Each `Flag` must have a name that corresponds to the name of a flag in the column's state and an optional icon name for display.

```
use UnexpectedJourney\FilamentToolbox\Tables\Columns\FlagColumn;
use UnexpectedJourney\FilamentToolbox\Tables\Columns\FlagColumn\Flag;

FLagColumn::make('flags')
    ->flags([
        Flag::make('trashed', 'heroicon-o-trash'),
        Flag::make('on_sale', 'heroicon-o-tag'),
        Flag::make('bundle', 'heroicon-o-archive-box')
    ])
```

Note: If the name used when making the flag does not exist as a key in the column's state, it will be considered inactive.

You may specify the icon used by using the dedicated `icon()` method if you prefer. Where ever you specify the icon you may pass a closure instead of a string. Using Filament's magic closures, add `$active` as one of the arguments to get the active state of the flag .

```
FLagColumn::make('flags')
    ->flags([
        Flag::make('trashed', 'heroicon-o-trash'),
        Flag::make('on_sale', 'heroicon-o-tag'),
        Flag::make('bundle', 'heroicon-o-archive-box'),
        Flag::make('visible')
            ->icon(fn(bool $active): string => $active
                ? 'heroicon-o-eye'
                : 'heroicon-o-eye-slash')

    ])
```

##### Customizing the display order

[](#customizing-the-display-order)

The flags are displayed in the order they appear in the `flags()` method and by default flags that are inactive are hidden.

##### Showing inactive flags

[](#showing-inactive-flags)

To show all flags including inactive, use the `showInactive()` method on the `FlagColumn` itself.

```
FLagColumn::make('flags')
    ->showInactive()
    ->flags([
        Flag::make('trashed', 'heroicon-o-trash'),
        Flag::make('on_sale', 'heroicon-o-tag'),
        Flag::make('bundle', 'heroicon-o-archive-box')
    ])
```

Showing or hiding inactive flags can also be done on a per-flag basis by calling `showWhenInactive()`. You may pass a closure to conditionally show the icon if it's inactive.

```
FLagColumn::make('flags')
    ->flags([
        Flag::make('trashed', 'heroicon-o-trash')
            ->showWhenInactive(),
        Flag::make('on_sale', 'heroicon-o-tag'),
        Flag::make('bundle', 'heroicon-o-archive-box')
    ])
```

Note: Using `showWhenInactive()` on a flag will override `showInactive()` called on the `FlagColumn`.

##### Changing the colors

[](#changing-the-colors)

By default, active flags will use the primary color of your Filament theme and inactive flags will use a gray color. You may change this for the entire `FlagColumn` or on each specific flag by calling the `activeColor()` and `inactiveColor()` methods.

Note: Colors defined on a flag will override colors defined on the `FlagColumn`.

```
use Filament\Support\Colors\Color;

FLagColumn::make('flags')
    ->activeColor('success')
    ->inactiveColor(Color::Stone)
    ->flags([
        Flag::make('trashed', 'heroicon-o-trash')
            ->activeColor('danger'),
        Flag::make('on_sale', 'heroicon-o-tag'),
        Flag::make('bundle', 'heroicon-o-archive-box')
    ])
```

##### Default icons

[](#default-icons)

If an icon is not specified for a flag a default icon will be used. The default active icon is 'heroicon-o-check-circle' and the default inactive icon is 'heroicon-o-x-circle'. Call the 'activeIcon()' and 'inactiveIcon()' methods on the `FlagColumn` to set their respective icons.

```
FLagColumn::make('flags')
    ->activeIcon('heroicon-o-check')
    ->inactiveIcon('heroicon-o-x-mark')
    ->flags([...])
```

##### Customizing the grid

[](#customizing-the-grid)

By default, the FlagColumn displays the flags in a grid of 3 icons. This is controlled much the same way that Filament layout components like `Filament\Tables\Columns\Layout\Grid` control their grid. Call the `columns()`. Refer to Filament's documentation for further details:

```

##### Tooltips
Tooltips are hidden by default but can be shown for all flags calling the `showTooltips()` method on the `FlagColumn`.

```PHP
FLagColumn::make('flags')
    ->showTooltips()
    ->flags([...])

```

Tooltips are a title cased string automatically generated from the name of the flag. You may specify your own tooltip by calling the `tooltip()` method on an individual flag. You may pass a closure to this method and access the active state of the flag by adding an `$active` argument.

```
FLagColumn::make('flags')
    ->showTooltips()
    ->flags([
        Flag::make('published', 'heroicon-o-calendar')
            ->tootip(fn(bool $active, Model $record): string => $active
                ? 'Published on '.$record->published_at
                : 'Not published')
    ])
```

Note: Tooltips will always be displayed for a flag when it is explicitly set even if the `FlagColumn` is not configured to show tooltips.

##### Urls

[](#urls)

Each individual flag can optionally be a link. Call the `url()` method on the flag to turn it into a link. This method accepts a string or a closure. You have access to the active state of the flag by adding an `$active` argument to your closure.

```
FLagColumn::make('flags')
    ->showTooltips()
    ->flags([
        Flag::make('published', 'heroicon-o-calendar')
            ->url(fn(bool $active, Model $record): ?string => $active
                ? $record->getUrl()
                : null)
    ])
```

You can open urls in a new tab by setting the `openInNewTab` parameter of the `url()` method or by calling the dedicated `openUrlInNewTab()` method on the flag.

```
FLagColumn::make('flags')
    ->showTooltips()
    ->flags([
        Flag::make('published', 'heroicon-o-calendar')
            ->url(...)
            ->openUrlInNewTab()
    ])
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Rhiannon Journey](https://github.com/rhiannonjourney)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.3% 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 ~53 days

Total

4

Last Release

760d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/49036ffcea54e2351dde75438e4c77a949c37333381a0e508f0595d70ed387c4?d=identicon)[rhiannonjourney](/maintainers/rhiannonjourney)

---

Top Contributors

[![rhiannonjourney](https://avatars.githubusercontent.com/u/148484535?v=4)](https://github.com/rhiannonjourney "rhiannonjourney (23 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravelunexpectedjourneyfilament-toolbox

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/unexpectedjourney-filament-toolbox/health.svg)

```
[![Health](https://phpackages.com/badges/unexpectedjourney-filament-toolbox/health.svg)](https://phpackages.com/packages/unexpectedjourney-filament-toolbox)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

58289.3k3](/packages/creagia-filament-code-field)[swisnl/filament-backgrounds

Beautiful backgrounds for Filament auth pages

54149.2k6](/packages/swisnl-filament-backgrounds)[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)

PHPackages © 2026

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