> 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).

# トーストを表示

現在のページから離れることなく、ユーザーの操作を確認したり即時フィードバックを提供したりするために、短いオーバーレイ通知を表示します。

## 概要

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

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

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

一般的には、ユーザーの操作に応じてトーストを使用します。トーストを使うべきか、別の種類のメッセージングを使うべきかを判断するには、「トースト vs. アラートモーダル vs. 確認」インタラクションを参照してください。

<figure><img src="https://9391847-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2Fgit-blob-7191735cb6cfd2415a688defc326b40e5d48d937%2FShow%20Toast%20Avonni%20Components.webp?alt=media" 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>トーストの意味的スタイル: <code>情報</code>, <code>成功</code>, <code>警告</code> または <code>エラー</code>.</td></tr><tr><td><strong>モード</strong></td><td>トーストの持続性を決定します。次のいずれかを選択します <code>閉じることができる</code>, <code>一定時間表示</code> と <code>固定表示</code>.</td></tr></tbody></table>

### モードの定義

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

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

  #### 一定時間表示

  * **説明**: この **`一定時間表示`** モードは、比較的長い時間トーストを画面上に表示し続けますが **`閉じることができる`**、設定時間が経過すると最終的に閉じます。すぐに注意を払う必要はなく、ユーザーは作業を続けられますが、メッセージを十分に読めるように長めに表示されます。
  * **使用方法**: このモードは、ユーザーにメッセージを見てもらう必要はあるものの、現在の作業を中断するほど緊急ではない、中程度に重要な通知に最適です。

  #### 固定表示

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

  <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.
