# Empty State > Placeholder for empty content areas with optional actions Source: https://shellui.dev/docs/v0.3/components/interactive/empty-state The EmptyState component provides a clear visual indicator when there is no content to display. Use it for empty lists, search results with no matches, or onboarding prompts. ## Installation ```bash shellui add empty-state ``` ## Basic Usage ```razor ``` ## With Icon ```razor ``` ## With Action Provide a call-to-action for the empty state: ```razor @code { private void HandleCreate() { // Navigate or open creation flow } } ``` ## Search Empty State For filtered or searched content: ```razor
@if (!filteredItems.Any()) { } else {
    @foreach (var item in filteredItems) {
  • @item
  • }
}
@code { private string searchQuery = "kiwi"; private readonly string[] items = ["Apple", "Banana", "Cherry"]; private IEnumerable filteredItems => items.Where(i => i.Contains(searchQuery, StringComparison.OrdinalIgnoreCase)); private void ClearSearch() => searchQuery = ""; } ``` ## Custom Content Use `ChildContent` for fully custom empty states: ```razor
Empty cart

Your cart is empty

Browse our products to find something you love.

``` ## Table Empty State Use inside a table when there are no rows: ```razor Name Status @if (!users.Any()) { }
@code { private List users = new(); } ``` ## API Reference | Property | Type | Default | Description | |----------|------|---------|-------------| | `Icon` | `string?` | `null` | Icon name to display | | `Title` | `string?` | `null` | Heading text | | `Description` | `string?` | `null` | Supporting description | | `Action` | `RenderFragment?` | `null` | Action buttons or links | | `ChildContent` | `RenderFragment` | `null` | Fully custom content | | `Class` | `string?` | `null` | Additional CSS classes | ## Accessibility The EmptyState component includes: - Semantic heading hierarchy - Descriptive text for screen readers - Focusable action elements - Decorative icons hidden via `aria-hidden`