Search by

madbox-99 / filament-essentials

MadBox-99

Sensible defaults for Filament: translated labels on every field, entry and column, plus optional component defaults.

Package info

github.com/MadBox-99/filament-essentials

pkg:composer/madbox-99/filament-essentials

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v2.0.0 2026-10-27 08:39 UTC

This package is auto-updated.

Last update: 2026-10-27 08:47:58 UTC


README

Sensible defaults for Filament. Once installed, every form field, infolist entry, table column and wizard step translates its label through Laravel's __() helper, so you never have to call ->translateLabel() again. Opinionated component defaults (max lengths, searchable selects, Hungarian date formats, upload limits) are available as an opt-in.

Installation

composer require madbox-99/filament-essentials

The service provider is auto-discovered. There is nothing else to set up.

Translated labels

Filament derives a label from the component name (first_name becomes First name). With this package that label is passed through __(), so a single entry in lang/hu.json translates it everywhere it appears:

{
    "First name": "Keresztnév"
}
TextInput::make('first_name');   // Keresztnév
TextEntry::make('first_name');   // Keresztnév
TextColumn::make('first_name');  // Keresztnév

The configuration is applied to Filament's base classes (Field, Entry, Column, Step), so it reaches every built-in and custom subclass. Labels without a translation render exactly as stock Filament.

To opt a single component out:

TextInput::make('first_name')->translateLabel(false);

Component defaults (opt-in)

Publish the config and enable them:

php artisan vendor:publish --tag=filament-essentials-config
// config/filament-essentials.php
'component_defaults' => true,
Component Default
TextInput maxLength(255)
Textarea maxLength(1000), rows(3)
RichEditor a fixed toolbar
Select searchable(), no preload
DatePicker, TimePicker, DateTimePicker Hungarian display formats
Toggle onColor('success'), offColor('gray')
CheckboxList searchable(), bulkToggleable()
FileUpload 2 MB, PDF and images, downloadable, previewable

Every value is configurable, and anything set on the component itself still wins:

TextInput::make('notes')->maxLength(500);

Configuration

return [
    'translate_labels' => true,
    'component_defaults' => false,
    // ...the individual component defaults
];

Requirements

  • PHP 8.3+
  • Filament 5

Upgrading from 1.x

  • The namespace is now MadBox99\FilamentEssentials; the facade was removed.
  • default_translatable is now translate_labels and is on by default. It also covers infolist entries and every table column.
  • Component defaults are off unless component_defaults is true, and their keys lost the default_ prefix (default_max_length is now text_input_max_length).

Testing

composer test

License

MIT. See LICENSE.