Neonatal Penguin March

    @capacitor/toast
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.8 • Public • Published

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

    Since: 1.0.0


    Interfaces

    ShowOptions

    Prop Type Description Default Since
    text string Text to display on the Toast 1.0.0
    duration 'short' | 'long' Duration of the Toast, either 'short' (2000ms) or 'long' (3500ms) 'short' 1.0.0
    position 'top' | 'center' | 'bottom' Position of the Toast 'bottom' 1.0.0

    Install

    npm i @capacitor/toast

    DownloadsWeekly Downloads

    4,208

    Version

    1.0.8

    License

    MIT

    Unpacked Size

    34.2 kB

    Total Files

    29

    Last publish

    Collaborators

    • itschaced
    • it_mike_s
    • larsmikkelsen
    • giralte-ionic
    • steven0351-ionic
    • jpender
    • ionicjs
    • maxlynch
    • mhartington
    • jcesarmobile
    • cmapoole
    • nhyatt