Toast


*** Toast는 라이브러리가 아닌 코드를 복사하여 프로젝트에서 직접 사용
Props
Props
Type
Default
Description
id
string
-
토스트 고유 아이디
title
string
-
타이틀
type
string
-
토스트 타입
Usage
sonner 라이브러리 설치
/src/app/layout.tsx에 <main> 하단에 Toaster 컴포넌트 추가
/src/components/ui에 toast 컴포넌트 파일 추가
실제 토스트를 사용할 컴포넌트에서 toast import하여 사용
Last updated