Overview
Introduction

Entry classes can be found in the Filament\Infolists\Components namespace. They reside within the schema array of components. Filament includes a number of entries built-in:
You may also create your own custom entries to display data however you wish.
Entries may be created using the static make() method, passing its unique name. Usually, the name of an entry corresponds to the name of an attribute on an Eloquent model. You may use "dot notation" to access attributes within relationships:
use Filament\Infolists\Components\TextEntry;
TextEntry::make('title')
TextEntry::make('author.name')

Entry content (state)
Entries may feel a bit magic at first, but they are designed to be simple to use and optimized to display data from an Eloquent record. Despite this, they are flexible and you can display data from any source, not just an Eloquent record attribute.
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. This means that the state of the entry is set based on the value of the attribute on the record. For example, if the entry is used in the infolist of a PostResource, then the title attribute value of the current post will be displayed.
use Filament\Infolists\Components\TextEntry;
TextEntry::make('title')
If you want to access the value stored in a relationship, you can use "dot notation". The name of the relationship that you would like to access data from comes first, followed by a dot, and then the name of the attribute:
use Filament\Infolists\Components\TextEntry;
TextEntry::make('author.name')
You can also use "dot notation" to access values within a JSON / array column on an Eloquent model. The name of the attribute comes first, followed by a dot, and then the key of the JSON object you want to read from:
use Filament\Infolists\Components\TextEntry;
TextEntry::make('meta.title')
Setting the state of an entry
You can pass your own state to an entry by using the state() method:
use Filament\Infolists\Components\TextEntry;
TextEntry::make('title')
->state('Hello, world!')
The state() method also accepts a function to dynamically calculate the state. You can inject various utilities into the function as parameters.
Learn more about utility injection.| Utility | Type | Parameter | Description |
|---|---|---|---|
| Entry | Filament\Infolists\Components\Entry | $component | The current entry component instance. |
| Get function | Filament\Schemas\Components\Utilities\Get | $get | A function for retrieving values from the current schema data. Validation is not run on form fields. |
| Livewire | Livewire\Component | $livewire | The Livewire component instance. |
| Eloquent model FQN | ?string<Illuminate\Database\Eloquent\Model> | $model | The Eloquent model FQN for the current schema. |
| Operation | string | $operation | The current operation being performed by the schema. Usually <code>create</code>, <code>edit</code>, or <code>view</code>. |
| Eloquent record | ?Illuminate\Database\Eloquent\Model | $record | The Eloquent record for the current schema. |
| State | mixed | $state | The current value of the entry. |
Setting the default state of an entry
When an entry is empty (its state is null), you can use the default() method to define alternative state to use instead. This method will treat the default state as if it were real, so entries like image or color will display the default image or color.
use Filament\Infolists\Components\TextEntry;
TextEntry::make('title')
->default('Untitled')
Adding placeholder text if an entry is empty
Sometimes you may want to display placeholder text for entries with an empty state, which is styled as a lighter gray text. This differs from the default value, as the placeholder is always text and not treated as if it were real state.
use Filament\Infolists\Components\TextEntry;
TextEntry::make('title')
->placeholder('Untitled')



