Skip to main content

Introduction

Text entries display simple text from your data source. They are the most commonly used entry type in infolists.

Available Methods

Formatting

Closure
Format the entry’s state using a custom closure. The closure receives the state and can return a formatted value.
string|Closure|null
Format the entry as a date using PHP date formatting tokens.
string|Closure|null
Format the entry as a date and time.
string|Closure|null
Format the entry as a time.
string|Closure|null
Format the entry as a relative time (e.g., “2 hours ago”).
string
Format the entry as a money value with currency.
int|Closure|null
Format the entry as a number with optional decimal places.
bool|Closure
Render the entry as Markdown.
bool|Closure
Render the entry as HTML.

Appearance

string|array|Closure
Set the text color.
string|Htmlable|Closure
Add an icon to the entry.
string|array|Closure
Set the icon color separately from the text color.
IconPosition
Set the icon position (before or after the text).
bool|Closure
Display the text as a badge with a background color.
TextSize
Set the text size.
FontWeight
Set the font weight.
FontFamily
Set the font family.

Lists

bool|Closure
Display array values with line breaks between items.
bool|Closure
Display array values as a bulleted list.
int|Closure|null
Limit the number of items displayed in a list.
bool|Closure
Allow users to expand a limited list to see all items.
string|Closure
Split a single value into multiple list items using a separator.

Text Manipulation

int|Closure|null
Limit the character length of the text.
int|Closure|null
Limit the word count of the text.
int|Closure|null
Limit the text to a specific number of lines.
bool|Closure
Control whether text wraps to the next line.
bool|Closure
Make the text copyable to clipboard on click.
string|Htmlable|Closure
Add a prefix before the text.
string|Htmlable|Closure
Add a suffix after the text.

Relationship Aggregation

string|array
Display the average of a relationship field.
string|array
Display the count of related records.
string|array
Display the maximum value of a relationship field.
string|array
Display the minimum value of a relationship field.
string|array
Display the sum of a relationship field.

Examples

Status Badge with Color

Formatted Money

Author List

API Key with Copy