Introduction
Filament’s infolists package lets you display a read-only list of data for a specific entity. It’s integrated into other Filament packages, such as inside panel resources, relation managers, and action modals. Understanding how to use the infolist builder will save you time when building custom Livewire applications or working with other Filament features. Infolists are designed to present structured data in a clean, organized format without the complexity of forms or the interactivity of tables. They excel at displaying detailed information about a single record, such as a user profile, product details, or order summary.Use Cases
Infolists are ideal for:- View Pages: Display detailed information about a specific record in a panel resource
- Action Modals: Show read-only data in modal dialogs
- Relation Managers: Present related record information
- Custom Livewire Components: Build custom information displays in your application
- Dashboard Widgets: Show key information in dashboard panels
Creating an Infolist
Infolists are built using entry components from theFilament\Infolists\Components namespace. Each entry displays a specific type of data:
Entry State
The data that an entry displays is called its “state”. When using a panel resource, the infolist is aware of the record it is displaying, and the state is automatically set based on the attribute value.Accessing Relationships
You can use dot notation to access values from relationships:Accessing JSON Data
Dot notation also works for accessing values within JSON or array columns:Custom State
You can manually set the state of an entry using thestate() method:
Entry Labels
By default, entry labels are automatically generated from the entry name. You can customize labels:Inline Labels
Display labels next to entry content instead of above it:Placeholder and Default Values
Display placeholder text when an entry has no value:Actions and URLs
Make entries clickable to navigate to a URL:Conditional Visibility
Hide entries based on conditions:Tooltips
Add helpful tooltips to entries:Alignment
Control the alignment of entry content:Extra Content Slots
Add additional content around entries using various slots:aboveLabel()- Content above the labelbeforeLabel()- Content before the label (inline)afterLabel()- Content after the label (inline)belowLabel()- Content below the labelaboveContent()- Content above the entry valuebeforeContent()- Content before the entry value (inline)afterContent()- Content after the entry value (inline)belowContent()- Content below the entry value