popover

Installation

Install Lara Zeus Popover by running the following commands in your Laravel project directory.

1composer require lara-zeus/popover

Usage:

use it in your table:

1\LaraZeus\Popover\Tables\PopoverColumn::make('name')
2 // most of filament methods will work
3 ->sortable()
4 ->searchable()
5 ->toggleable()
6 
7 // main options
8 ->trigger('click') // support click and hover
9 ->placement('right') // for more: https://alpinejs.dev/plugins/anchor#positioning
10 ->offset(10) // int px, for more: https://alpinejs.dev/plugins/anchor#offset
11 ->popOverMaxWidth('none')
12 ->icon('heroicon-o-chevron-right') // show custom icon
13 
14 // direct HTML content
15 ->content(fn($record) => new HtmlString($record->name.'<br>'.$record->email))
16 
17 // or blade content
18 ->content(fn($record) => view('filament.test.user-card', ['record' => $record]))
19 
20 // or livewire component
21 ->content(fn($record) => new HtmlString(Blade::render('@livewire(\App\Filament\Widgets\Stats::class, ["lazy" => true])')))
22,

use it in your infolist:

1\LaraZeus\Popover\Infolists\PopoverEntry::make('name')
2 // main options
3 ->trigger('click') // support click and hover
4 ->placement('right') // for more: https://alpinejs.dev/plugins/anchor#positioning
5 ->offset(10) // int px, for more: https://alpinejs.dev/plugins/anchor#offset
6 ->popOverMaxWidth('none')
7 ->icon('heroicon-o-chevron-right') // show custom icon
8 
9 // direct HTML content
10 ->content(fn($record) => new HtmlString($record->name.'<br>'.$record->email))
11 
12 // or blade content
13 ->content(fn($record) => view('filament.test.user-card', ['record' => $record]))
14 
15 // or livewire component
16 ->content(fn($record) => new HtmlString(Blade::render('@livewire(\App\Filament\Widgets\Stats::class, ["lazy" => true])')))
17,

use it in your forms as a placeholder:

1\LaraZeus\Popover\Form\PopoverForm::make('name')
2 // main options
3 ->trigger('click') // support click and hover
4 ->placement('right') // for more: https://alpinejs.dev/plugins/anchor#positioning
5 ->offset(10) // int px, for more: https://alpinejs.dev/plugins/anchor#offset
6 ->popOverMaxWidth('none')
7 ->icon('heroicon-o-chevron-right') // show custom icon
8 
9 // direct HTML content
10 ->content(fn($record) => new HtmlString($record->name.'<br>'.$record->email))
11 
12 // or blade content
13 ->content(fn($record) => view('filament.test.user-card', ['record' => $record]))
14 
15 // or livewire component
16 ->content(fn($record) => new HtmlString(Blade::render('@livewire(\App\Filament\Widgets\Stats::class, ["lazy" => true])')))
17,

Zeus is an open-source project. Thanks to my sponsors for helping me maintain this project.