> ## Documentation Index
> Fetch the complete documentation index at: https://filament-34a8cf01.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Empty state

> [!WARNING]
>
> You are currently viewing the documentation for Filament 4.x, which is a previous version of Filament.
>
> Looking for the current stable version? Visit the [5.x documentation](https://filament-34a8cf01.mintlify.site/5.x/tables/empty-state.md).

## Introduction

The table's "empty state" is rendered when there are no rows in the table.

Loading preview

![Table with empty state](https://filament-34a8cf01.mintlify.site/docs/images/4.x/light/tables/empty-state.jpg)

## Setting the empty state heading

To customize the heading of the empty state, use the `emptyStateHeading()` method:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Tables\Table;

public function table(Table $table): Table
{
    return $table
        ->emptyStateHeading('No posts yet');
}
```

Loading preview

![Table with customized empty state heading](https://filament-34a8cf01.mintlify.site/docs/images/4.x/light/tables/empty-state-heading.jpg)

## Setting the empty state description

To customize the description of the empty state, use the `emptyStateDescription()` method:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Tables\Table;

public function table(Table $table): Table
{
    return $table
        ->emptyStateDescription('Once you write your first post, it will appear here.');
}
```

Loading preview

![Table with empty state description](https://filament-34a8cf01.mintlify.site/docs/images/4.x/light/tables/empty-state-description.jpg)

## Setting the empty state icon

To customize the [icon](https://filament-34a8cf01.mintlify.site/4.x/styling/icons.md) of the empty state, use the `emptyStateIcon()` method:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Tables\Table;

public function table(Table $table): Table
{
    return $table
        ->emptyStateIcon('heroicon-o-bookmark');
}
```

Loading preview

![Table with customized empty state icon](https://filament-34a8cf01.mintlify.site/docs/images/4.x/light/tables/empty-state-icon.jpg)

## Adding empty state actions

You can add [Actions](https://filament-34a8cf01.mintlify.site/4.x/tables/actions.md) to the empty state to prompt users to take action. Pass these to the `emptyStateActions()` method:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Actions\Action;
use Filament\Tables\Table;

public function table(Table $table): Table
{
    return $table
        ->emptyStateActions([
            Action::make('create')
                ->label('Create post')
                ->url(route('posts.create'))
                ->icon('heroicon-m-plus')
                ->button(),
        ]);
}
```

Loading preview

![Table with empty state actions](https://filament-34a8cf01.mintlify.site/docs/images/4.x/light/tables/empty-state-actions.jpg)

## Using a custom empty state view

You may use a completely custom empty state view by passing it to the `emptyState()` method:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Tables\Table;

public function table(Table $table): Table
{
    return $table
        ->emptyState(view('tables.posts.empty-state'));
}
```

[Edit this page on GitHub](https://github.com/filamentphp/filament/edit/4.x/packages/tables/docs/08-empty-state.md)

## Sponsored by

[Your logo here](https://github.com/sponsors/danharrin)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.