Toast

The Toast API provides a notification pop up.

Install

//with npm
npm install @capacitor/toast


Usage

transition({
	type: MOBILE_SHOW_TOAST_MESSAGE,
    toastMessage: "Hey You!",
    duration: 'long',
    position: 'bottom'
})


API

ID Next States Description
MOBILE_SHOW_TOAST_MESSAGE MOBILE_ON_LOADED This transition displays the toast


Properties

Name Type Default Description
toastMessage string Text that has to be displayed in the toast
duration 'short' | 'long' 'short' Duration of the Toast, either ‘short’ (2000ms) or ‘long’ (3500ms)
position String 'top' | 'center' | 'bottom' Position of the Toast