컴포넌트
Empty State
비어 있을 때 다음 행동을 안내한다.
아직 등록된 구성원이 없어요
첫 구성원을 추가하면 여기에 목록이 생겨요.
import { Plus, Users } from 'lucide-react'
import { Button } from '@zest/primitives/Button.js'
import { EmptyState } from '@zest/primitives/EmptyState.js'
export default function Demo() {
return <EmptyState icon={<Users />} title="아직 등록된 구성원이 없어요" description="첫 구성원을 추가하면 여기에 목록이 생겨요." action={<Button leftIcon={<Plus />}>구성원 추가하기</Button>} />
}설치
shadcn CLI 로 소스를 프로젝트에 가져와요. 테마·유틸·의존 부품이 함께 설치돼요.
npx shadcn@latest add @zest/empty-state패키지로 쓰려면 @zest-im/ui 에서 가져와요. 설치 안내
사용법
import { EmptyState } from '@/components/ui/empty-state'위 미리보기의 「코드」 탭이 실제로 동작하는 예제예요.
API
| prop | 타입 | 설명 |
|---|---|---|
icon? | ReactNode | — |
title | string | — |
description? | string | — |
action? | ReactNode | — |
className? | string | — |
표에 없는 HTML·Radix 속성은 그대로 전달돼요.