mmoollllee/filament-builder-title
Filament Builder Title adds a builder-style title field to Filament admin resources, letting you compose, edit, and display dynamic titles directly in forms and tables. Lightweight, easy to install, and simple to integrate into existing Filament projects.
Install the package and confirm the macros are registered in a scratch Filament form:
composer require mmoollllee/filament-builder-title
Start with the package README examples for Block::->title() and Repeater::->title(), then look at the testbench nested-builder demo page and render tests if you need to see preview/detached and nested-builder behavior.
First use case: replace a read-only builder block label with an editable header title.
use Filament\Forms\Components\Builder;
use Filament\Forms\Components\Builder\Block;
use Filament\Forms\Components\TextInput;
Builder::make('blocks')
->blocks([
Block::make('hero')
->title()
->schema([
TextInput::make('title')->required(),
// ...
]),
]);
For repeater rows, pair ->title() with a hidden field so the header input has state to persist:
use Filament\Forms\Components\Hidden;
use Filament\Forms\Components\Repeater;
Repeater::make('items')
->title()
->schema([
Hidden::make('title'),
// ...
]);
v0.3.0 is a safe upgrade from v0.2.1: it fixes preview-block titles and adds the repeater title macro, with no user-facing breaking changes noted.
Block::make(...)->title() and keep the title field in the block schema. The macro renders an inline editable title in the block header instead of relying on a static label.Repeater::make(...)->title() with Hidden::make($field) in the row schema. This replaces the read-only itemLabel with an editable header input; the hidden field is what persists the value.->preview(), Filament static-renders the preview and does not mount the block schema, so the header input cannot resolve a server-side wire path. v0.3.0 restores the client-side path rebuild from the builder item DOM.x-sortable-item and the builder-expand event, so nested titles bind correctly.firstError() helper, so validation messages for the title field can surface in the header. Keep normal validation rules on the actual field.->preview() blocks. v0.2.0 dropped the client-side fallback and left preview blocks with a plain-text label; v0.3.0 fixes that regression.$wire path resolution inside a preview header. The title input rebuilds its path client-side, so custom header markup must keep the builder item’s x-sortable-item attribute and the x-on:builder-expand.window event intact.Repeater::->title() is a header input, not a replacement for the row schema field. Without Hidden::make($field) the title has nowhere to persist.x-sortable-item attribute or stopped the builder-expand event from bubbling.TextInput in the header unless you replicate the client-side path logic. Preview/detached blocks will not bind correctly with a normal server-resolved field.: static to fix a false intelephense(P1006). No action is needed for normal use, but copied macros should avoid the static return type.titleInput() / firstError() helpers are internal. If you need custom header UI, wrap the package behavior or mirror the DOM contract instead of reimplementing path binding. The package tests for detached blocks and nested builders are the best reference for expected behavior.How can I help you explore Laravel packages today?