Empty
Un componente para comunicar cuando no hay datos, elementos o resultados para mostrar.
Cuándo Usarlo
Cuando no se proporcionan datos, mostrar para consejos amigables.
Uso de Ejemplo
No projects found
Get started by creating a new project or importing an existing one.
astro
---
import Empty from '@/components/data-display/Empty.astro';
import Button from '@/components/general/Button.astro';
---
<Empty
variant="bordered"
title="No projects found"
description="Get started by creating a new project or importing an existing one."
>
<div slot="actions">
<Button variant="primary">Create Project</Button>
<Button variant="outline">Learn More</Button>
</div>
</Empty> Con Icono Personalizado
No results
We couldn't find anything matching your search query. Try different keywords.
astro
---
import Empty from '@/components/data-display/Empty.astro';
import Button from '@/components/general/Button.astro';
---
<Empty
icon="SearchX"
title="No results"
description="We couldn't find anything matching your search query. Try different keywords."
>
<Button slot="actions" variant="outline">Clear Filters</Button>
</Empty> Tamaños
Small Empty State
Useful for smaller containers.
Large Empty State
A highly visible empty state for main page areas.
astro
<Empty size="sm" title="Small Empty State" description="Useful for smaller containers." />
<Empty size="lg" title="Large Empty State" description="A highly visible empty state for main page areas." /> Referencia de la API
| Propiedad | Descripción | Tipo | Por defecto |
|---|---|---|---|
| variant | The visual style variant of the empty state. | 'default' | 'bordered' | 'default' |
| size | The padding size of the container. | 'sm' | 'md' | 'lg' | 'md' |
| icon | The Lucide icon name to display. | IconName | 'Inbox' |
| title | The main heading text. | string | 'No Data' |
| description | The descriptive text below the title. | string | 'There is currently no data to display.' |
| class | Additional CSS classes to apply. | string | - |