> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-chore-sync-comfy-api-v2-spec-b886298.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 토스트 API

> ComfyUI Toast API로 사용자에게 비차단 알림 메시지를 표시합니다. 기본 사용법, toast 타입(success, warning, error), alert 헬퍼, 전체 API 레퍼런스를 다룹니다.

토스트 API는 사용자에게 비블록킹 방식의 알림 메시지를 표시하는 방법을 제공합니다. 이는 작업 흐름을 방해하지 않으면서 피드백을 제공하는 데 유용합니다.

## 기본 사용법

### 간단한 토스트

```javascript theme={null}
// 간단한 정보 토스트 표시
app.extensionManager.toast.add({
  severity: "info",
  summary: "정보",
  detail: "작업이 성공적으로 완료되었습니다",
  life: 3000
});
```

### 토스트 유형

```javascript theme={null}
// 성공 토스트
app.extensionManager.toast.add({
  severity: "success",
  summary: "성공",
  detail: "데이터가 성공적으로 저장되었습니다",
  life: 3000
});

// 경고 토스트
app.extensionManager.toast.add({
  severity: "warn",
  summary: "경고",
  detail: "이 작업은 문제를 일으킬 수 있습니다",
  life: 5000
});

// 오류 토스트
app.extensionManager.toast.add({
  severity: "error",
  summary: "오류",
  detail: "요청 처리에 실패했습니다",
  life: 5000
});
```

### 알림 도우미

```javascript theme={null}
// 알림 토스트 생성을 위한 단축형
app.extensionManager.toast.addAlert("이것은 중요한 메시지입니다");
```

## API 참조

### 토스트 메시지

```javascript theme={null}
app.extensionManager.toast.add({
  severity?: "success" | "info" | "warn" | "error" | "secondary" | "contrast", // 메시지의 심각도 수준 (기본값: "info")
  summary?: string,         // 토스트의 짧은 제목
  detail?: any,             // 상세한 메시지 내용
  closable?: boolean,       // 사용자가 토스트를 닫을 수 있는지 여부 (기본값: true)
  life?: number,            // 자동으로 닫히기 전의 지속 시간(밀리초)
  group?: string,           // 관련 토스트 관리를 위한 그룹 식별자
  styleClass?: any,         // 메시지의 스타일 클래스
  contentStyleClass?: any   // 내용의 스타일 클래스
});
```

### 알림 도우미

```javascript theme={null}
app.extensionManager.toast.addAlert(message: string);
```

### 추가 메서드

```javascript theme={null}
// 특정 토스트 제거
app.extensionManager.toast.remove(toastMessage);

// 모든 토스트 제거
app.extensionManager.toast.removeAll();
```
