See how Capacitor fits into the entire Ionic Ecosystem ->
Capacitor is part of the Ionic Ecosystem ->
DocsプラグインCLI
pwaiosandroid

Toast

Toast APIは、ユーザに重要な情報を表示するための通知ポップアップを提供します。本物のトーストみたい!

PWA Notes

PWA Elements are required for Toast plugin to work.

Example

import { Plugins } from '@capacitor/core';
const { Toast } = Plugins;

async show() {
  await Toast.show({
    text: 'Hello!'
  });
}

API

show(…)

show(options: ToastShowOptions) => Promise<void>
Param Type
options ToastShowOptions

Interfaces

ToastShowOptions

Prop Type Description
text string
duration "short" | "long" Duration of the toast, either ‘short’ (2000ms, default) or ‘long’ (3500ms)
position "center" | "bottom" | "top"
Previous
<- Storage
Contribute ->