@capacitor/toast
The Toast API provides a notification pop up for displaying important information to a user. Just like real toast!
Install
npm install @capacitor/toast
npx cap sync
PWA Notes
PWA Elements are required for the Toast plugin to work.
Example
import { Toast } from '@capacitor/toast';
const showHelloToast = async () => {
await Toast.show({
text: 'Hello!',
});
};
API
show(...)
show(options: ShowOptions) => Promise<void>
Shows a Toast on the screen
Param | Type |
---|---|
options |
|
Since: 1.0.0