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

# トーストを表示

現在のページから移動せずに、ユーザーの操作を確認したり即時フィードバックを与えたりするために、短いオーバーレイ通知を表示します。

## 概要

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

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

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

一般的には、ユーザー操作への応答としてトーストインタラクションを使用します。トーストを使うべきか、別の種類のメッセージを使うべきかを判断するには、「Toasts vs. Alert Modal vs. Confirm interaction」を参照してください。

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

### モードの定義

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

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

  #### 一定時間表示

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

  #### 固定

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

  <br>

## 例

メンバーが Avonni ボタンから設定を保存するコミュニティページを想像してください:

1. ボタンの **クリック時**で、インタラクションを **種類** から **トーストを表示**.
2. 次を設定します **タイトル** 「Preferences saved」に設定し、 **メッセージ** は空欄のままにします — タイトルだけで十分です。
3. 次を選択します `成功` **バリアント** そうすると、トーストが確認メッセージとして表示されます。
4. を空欄のままにします **モード** オン `閉じることができる` そうすると、メンバーが閉じなくてもトーストは自動的に消えます。

実際に処理を行うインタラクションの後に連結します — たとえば、 **完了時** のステップとして **Flow ダイアログを開く** — こうすることで、保存が実際に成功したときにのみトーストが表示されます。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
