Skip to main content

Introduction

Filament provides a variety of entry components to display different types of data in your infolists. Each entry type is optimized for presenting specific kinds of information in a user-friendly way.

Available Entry Types

All entry classes are found in the Filament\Infolists\Components namespace.

Text Entry

Display text, numbers, dates, and formatted content

Icon Entry

Show icons representing states or boolean values

Image Entry

Display single or multiple images from your storage

Color Entry

Render color previews from CSS color definitions

Code Entry

Display syntax-highlighted code snippets

Key-Value Entry

Show key-value pairs from JSON or array data

Repeatable Entry

Repeat entry schemas for array or relationship data

View Entry

Render custom Blade views with complete flexibility

Text Entry

The text entry is the most versatile entry type, capable of displaying simple text, formatted dates, numbers, money values, and more.

Key Features

  • Formatting: Date, time, number, money, and custom formatting
  • Badges: Display text as colored badges
  • Icons: Add icons before or after text
  • Colors: Apply color schemes to text
  • Lists: Handle array values with bullet points or line breaks
  • Copyable: Make text copyable to clipboard
  • Limits: Truncate text by characters, words, or lines

Common Examples

Icon Entry

Icon entries render icons to represent data states, particularly useful for boolean values or status indicators.

Key Features

  • Boolean Display: Automatic check/cross icons for true/false values
  • Custom Icons: Define icons based on state
  • Colors: Apply colors to match your design system
  • Sizing: Control icon size from extra small to extra large

Image Entry

Image entries display images from your filesystem or external URLs, with support for multiple images, circular avatars, and stacked displays.

Key Features

  • Disk Management: Specify storage disk (local, s3, etc.)
  • Sizing: Control width and height
  • Shapes: Square or circular images
  • Stacking: Display multiple images overlapping
  • Limits: Show only a certain number of images
  • Default Images: Provide placeholder image URLs

Color Entry

Display color previews from CSS color values (HEX, RGB, HSL, RGBA).

Key Features

  • Format Support: HEX, RGB, HSL, RGBA
  • Copyable: Copy color values to clipboard
  • Visual Preview: Shows actual color swatch

Code Entry

Display syntax-highlighted code using the Phiki library.

Key Features

  • 200+ Languages: Full support for programming languages
  • 50+ Themes: Beautiful syntax highlighting themes
  • Copyable: Copy code to clipboard
  • Automatic JSON: Arrays are automatically converted to JSON
To use code entries, install Phiki: composer require phiki/phiki

Key-Value Entry

Display key-value pairs from JSON objects or PHP arrays.
Example data structure:

Key Features

  • Custom Labels: Customize column headers
  • JSON Support: Automatically handles JSON columns
  • Array Cast: Works with Eloquent array casts

Repeatable Entry

Repeat a schema of entries for each item in an array or relationship.

Key Features

  • Schema Nesting: Include any entry types in the schema
  • Grid Layout: Organize items in responsive grids
  • Table Layout: Display items in a tabular format
  • Relationships: Works with Eloquent relationships

Table Layout

View Entry

Render completely custom Blade views for maximum flexibility.
In your Blade view, you have access to:
  • $getState() - Get the entry’s state
  • $getRecord() - Get the current record

Creating Custom Entries

You can create your own custom entry types using the Artisan command:
This creates:
  • An entry class in app/Filament/Infolists/Entries/CustomEntry.php
  • A Blade view in resources/views/filament/infolists/entries/custom-entry.blade.php
Custom entries extend the base Entry class and can implement any custom logic needed for your application.

Common Entry Methods

All entry types share common methods:

Best Practices

  1. Choose the Right Entry Type: Use specialized entries (Icon, Image, Color) instead of TextEntry when possible
  2. Use Badges for Status: Display status values as badges with appropriate colors
  3. Leverage Relationships: Use dot notation to access related data
  4. Add Tooltips: Provide context with tooltips for technical or unclear fields
  5. Keep Labels Clear: Use descriptive labels or hide them when context is obvious
  6. Format Data Appropriately: Use date(), money(), and number() formatters for proper display
  7. Consider Mobile: Use inline labels sparingly as they consume horizontal space

Next Steps

  • Learn about layout components to organize your entries
  • Explore actions to add interactivity to infolists
  • Understand utility injection for dynamic values