Empty
표시할 데이터, 항목 또는 결과가 없을 때 이를 알리는 컴포넌트입니다.
사용 시기
제공된 데이터가 없을 때, 친절한 팁을 표시합니다.
사용 예시
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> 사용자 지정 아이콘 사용
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> 크기
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." /> API 참조
| 속성 | 설명 | 타입 | 기본값 |
|---|---|---|---|
| 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 | - |