Introduction
Text entries display simple text:Customizing the color
You may set a color for the text:As well as allowing a static value, the color() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
color() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Adding an icon
Text entries may also have an icon:The icon() method also accepts a function to dynamically calculate the icon. You can inject various utilities into the function as parameters.
icon() method also accepts a function to dynamically calculate the icon. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
iconPosition():
The iconPosition() method also accepts a function to dynamically calculate the icon position. You can inject various utilities into the function as parameters.
iconPosition() method also accepts a function to dynamically calculate the icon position. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
iconColor():
The iconColor() method also accepts a function to dynamically calculate the icon color. You can inject various utilities into the function as parameters.
iconColor() method also accepts a function to dynamically calculate the icon color. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Displaying as a “badge”
By default, text is quite plain and has no background color. You can make it appear as a “badge” instead using thebadge() method. A great use case for this is with statuses, where may want to display a badge with a color that matches the status:
As well as allowing a static value, the badge() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
badge() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Formatting
When using a text entry, you may want the actual outputted text in the UI to differ from the raw state of the entry, which is often automatically retrieved from an Eloquent model. Formatting the state allows you to preserve the integrity of the raw data while also allowing it to be presented in a more user-friendly way. To format the state of a text entry without changing the state itself, you can use theformatStateUsing() method. This method accepts a function that takes the state as an argument and returns the formatted state:
status column in the database might contain values like draft, reviewing, published, or rejected, but the formatted state will be the translated version of these values.
The function passed to formatStateUsing() can inject various utilities as parameters.
formatStateUsing() can inject various utilities as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Date formatting
Instead of passing a function toformatStateUsing(), you may use the date(), dateTime(), and time() methods to format the entry’s state using PHP date formatting tokens:
date(), dateTime(), or time() method. You may use any PHP date formatting tokens:
As well as allowing static values, the date(), dateTime(), and time() methods also accept a function to dynamically calculate the format. You can inject various utilities into the function as parameters.
date(), dateTime(), and time() methods also accept a function to dynamically calculate the format. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Date formatting using Carbon macro formats
You may use also theisoDate(), isoDateTime(), and isoTime() methods to format the entry’s state using Carbon’s macro-formats:
isoDate(), isoDateTime(), or isoTime() method. You may use any Carbon’s macro-formats:
As well as allowing static values, the isoDate(), isoDateTime(), and isoTime() methods also accept a function to dynamically calculate the format. You can inject various utilities into the function as parameters.
isoDate(), isoDateTime(), and isoTime() methods also accept a function to dynamically calculate the format. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Relative date formatting
You may use thesince() method to format the entry’s state using Carbon’s diffForHumans():
Displaying a formatting date in a tooltip
Additionally, you can use thedateTooltip(), dateTimeTooltip(), timeTooltip(), isoDateTooltip(), isoDateTimeTooltip(), isoTime(), isoTimeTooltip(), or sinceTooltip() method to display a formatted date in a tooltip, often to provide extra information:
Setting the timezone for date formatting
Each of the date formatting methods listed above also accepts atimezone argument, which allows you to convert the time set in the state to a different timezone:
timezone() method of the entry to apply a timezone to all date-time formatting methods at once:
As well as allowing static values, the timezone() method also accepts a function to dynamically calculate the timezone. You can inject various utilities into the function as parameters.
timezone() method also accepts a function to dynamically calculate the timezone. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
timezone() to the entry, it will use Filament’s default timezone. You can set Filament’s default timezone using the FilamentTimezone::set() method in the boot() method of a service provider such as AppServiceProvider:
Number formatting
Instead of passing a function toformatStateUsing(), you can use the numeric() method to format an entry as a number:
decimalPlaces argument:
As well as allowing static values, the decimalPlaces argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
decimalPlaces argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
locale argument:
As well as allowing static values, the locale argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
locale argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Money formatting
Instead of passing a function toformatStateUsing(), you can use the money() method to easily format amounts of money, in any currency:
As well as allowing static values, the money() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
money() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
divideBy argument for money() that allows you to divide the original value by a number before formatting it. This could be useful if your database stores the price in cents, for example:
As well as allowing static values, the divideBy argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
divideBy argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
locale argument:
As well as allowing static values, the locale argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
locale argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
decimalPlaces argument:
As well as allowing static values, the decimalPlaces argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
decimalPlaces argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Rendering Markdown
If your entry value is Markdown, you may render it usingmarkdown():
As well as allowing a static value, the markdown() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
markdown() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Rendering HTML
If your entry value is HTML, you may render it usinghtml():
As well as allowing a static value, the html() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
html() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Rendering raw HTML without sanitization
If you use this method, then the HTML will be sanitized to remove any potentially unsafe content before it is rendered. If you’d like to opt out of this behavior, you can wrap the HTML in anHtmlString object by formatting it:
Be cautious when rendering raw HTML, as it may contain malicious content, which can lead to security vulnerabilities in your app such as cross-site scripting (XSS) attacks. Always ensure that the HTML you are rendering is safe before using this method.
view() object from the formatStateUsing() method, which will also not be sanitized:
Listing multiple values
Multiple values can be rendered in a text entry if its state is an array. This can happen if you are using anarray cast on an Eloquent attribute, an Eloquent relationship with multiple results, or if you have passed an array to the state() method. If there are multiple values inside your text entry, they will be comma-separated. You may use the listWithLineBreaks() method to display them on new lines instead:
As well as allowing a static value, the listWithLineBreaks() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
listWithLineBreaks() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Adding bullet points to the list
You may add a bullet point to each list item using thebulleted() method:
As well as allowing a static value, the bulleted() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
bulleted() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Limiting the number of values in the list
You can limit the number of values in the list using thelimitList() method:
As well as allowing a static value, the limitList() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
limitList() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Expanding the limited list
You can allow the limited items to be expanded and collapsed, using theexpandableLimitedList() method:
This is only a feature for
listWithLineBreaks() or bulleted(), where each item is on its own line.As well as allowing a static value, the expandableLimitedList() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
expandableLimitedList() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Splitting a single value into multiple list items
If you want to “explode” a text string from your model into multiple list items, you can do so with theseparator() method. This is useful for displaying comma-separated tags as badges, for example:
As well as allowing a static value, the separator() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
separator() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Aggregating relationships
Filament provides several methods for aggregating a relationship field, includingavg(), max(), min() and sum(). For instance, if you wish to show the average of a field on all related records, you may use the avg() method:
users is the name of the relationship, while age is the field that is being averaged. The name of the entry must be users_avg_age, as this is the convention that Laravel uses for storing the result.
If you’d like to scope the relationship before aggregating, you can pass an array to the method, where the key is the relationship name and the value is the function to scope the Eloquent query with:
Customizing the text size
Text entries have small font size by default, but you may change this toTextSize::ExtraSmall, TextSize::Medium, or TextSize::Large.
For instance, you may make the text larger using size(TextSize::Large):
Customizing the font weight
Text entries have regular font weight by default, but you may change this to any of the following options:FontWeight::Thin, FontWeight::ExtraLight, FontWeight::Light, FontWeight::Medium, FontWeight::SemiBold, FontWeight::Bold, FontWeight::ExtraBold or FontWeight::Black.
For instance, you may make the font bold using weight(FontWeight::Bold):
As well as allowing a static value, the weight() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
weight() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Customizing the font family
You can change the text font family to any of the following options:FontFamily::Sans, FontFamily::Serif or FontFamily::Mono.
For instance, you may make the font monospaced using fontFamily(FontFamily::Mono):
As well as allowing a static value, the fontFamily() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
fontFamily() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Handling long text
Limiting text length
You maylimit() the length of the entry’s value:
As well as allowing a static value, the limit() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
limit() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
...) is appended to the end of the text. You may customize this by passing a custom string to the end argument:
As well as allowing a static value, the end argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
end argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
limit() in a function, by getting it using the getCharacterLimit() method:
Limiting word count
You may limit the number ofwords() displayed in the entry:
As well as allowing a static value, the words() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
words() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
...) is appended to the end of the text. You may customize this by passing a custom string to the end argument:
As well as allowing a static value, the end argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
end argument also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Limiting text to a specific number of lines
You may want to limit text to a specific number of lines instead of limiting it to a fixed length. Clamping text to a number of lines is useful in responsive interfaces where you want to ensure a consistent experience across all screen sizes. This can be achieved using thelineClamp() method:
As well as allowing a static value, the lineClamp() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
lineClamp() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Preventing text wrapping
By default, text will wrap to the next line if it exceeds the width of the container. You can prevent this behavior using thewrap(false) method:
As well as allowing a static value, the wrap() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
wrap() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.
Allowing the text to be copied to the clipboard
You may make the text copyable, such that clicking on the entry copies the text to the clipboard, and optionally specify a custom confirmation message and duration in milliseconds:As well as allowing static values, the copyable(), copyMessage(), and copyMessageDuration() methods also accept functions to dynamically calculate them. You can inject various utilities into the function as parameters.
copyable(), copyMessage(), and copyMessageDuration() methods also accept functions to dynamically calculate them. You can inject various utilities into the function as parameters.Learn more about utility injection.
Entry
$component
Filament\Infolists\Components\Entry
The current entry component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
State
$state
mixed
The current value of the entry.