> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/experience-cloud/experience-cloud-ja/puropatipaneru/interactions/show-toast.md).

# トーストを表示

## 概要

ユーザーの操作を確認し、フィードバックを提供するためにトーストメッセージを使用します。トーストは、横方向に積み重なるオーバーレイ通知で、ユーザーが閉じることができます。

次の種類の応答のいずれかにはトーストを使用します：

* **`情報：`** ユーザーに、操作によって処理が開始され、次に進む前に完了まで待つ必要がある場合があることを知らせます。
* **`成功：`** 操作が成功した、または完了したことを確認します。
* **`警告：`** 警告トーストは、ユーザーの操作に関連する潜在的な問題を知らせ、将来の問題を防ぐための指針を示します。
* **`エラー：`** ユーザーが現在の操作を完了できない問題を伝えます。これは現在のフロー内で修正できます。

一般的には、ユーザーの操作に応じてトーストを使用します。Toast、Alert Modal、Confirm のどれを使うべきかを判断するには、「Toasts vs. Alert Modal vs. Confirm のインタラクション」に進んでください。

<figure><img src="/files/a22de3b1ba46bfc926e18e1e89525b9d4feb9b3f" alt=""><figcaption></figcaption></figure>

## 仕様

<table><thead><tr><th width="214">プロパティ</th><th>説明</th></tr></thead><tbody><tr><td><strong>タイトル</strong></td><td>ヘッダーに表示されるテキスト。</td></tr><tr><td><strong>メッセージ</strong></td><td>アラートボックスのメインコンテンツメッセージ。</td></tr><tr><td><strong>バリアント</strong></td><td>アラートモーダルの見た目。ヘッダーの有無を含みます。</td></tr><tr><td><strong>モード</strong></td><td>トーストの持続性を決定します。次のいずれかを選択します <code>閉じることができる</code>, <code>短時間表示</code> と <code>固定表示</code>.</td></tr></tbody></table>

### モードの定義

* #### 閉じることができる

  * **説明**：次のモードのトーストは **`閉じることができる`** モードでは、トーストは短時間表示された後、自動的にフェードアウトします。ユーザーは、トーストをクリックするか閉じるボタンを押して、早めに閉じることもできます。
  * **使用方法**：このモードは、ユーザーのワークフローにとって重要ではない情報メッセージに使用します。ユーザー操作を必要とせずに消えるため、スムーズなユーザー体験を維持できます。

  #### 短時間表示

  * **説明**： **`短時間表示`** モードは、 **`閉じることができる`**&#x3088;りも長い時間トーストを画面に表示し続けますが、最終的には設定時間後に閉じます。すぐに注意を要するものではなく、ユーザーは作業を続けられますが、メッセージを読む十分な時間を確保するために、より長く表示されます。
  * **使用方法**：このモードは、ユーザーにメッセージを確実に見てもらいたいが、現在の作業を中断させるほど緊急ではない、中程度の重要度の通知に最適です。

  #### 固定表示

  * **説明**：トーストを **`固定表示`** モードに設定すると、ユーザーが閉じる操作を行うまで画面に無期限に表示されます。自動的に消えることはありません。
  * **使用方法**：留めておく **`固定表示`** モードは、処理を続ける前にユーザーの注意や操作が必要な重大な警告に使用してください。これらのメッセージは非常に重要であり、ユーザーが確認するまで表示したままにして、メッセージが確実に認識されるようにする必要があります。

  <br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.avonnicomponents.com/experience-cloud/experience-cloud-ja/puropatipaneru/interactions/show-toast.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
