5.0.2 • Published 9 months ago

@jigra/toast v5.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@jigra/toast

The Toast API provides a notification pop up for displaying important information to a user. Just like real toast!

Install

npm install @jigra/toast
npx jig sync

PWA Notes

PWA Elements are required for the Toast plugin to work.

Example

import { Toast } from '@jigra/toast';

const showHelloToast = async () => {
  await Toast.show({
    text: 'Hello!',
  });
};

API

show(...)

show(options: ShowOptions) => Promise<void>

Shows a Toast on the screen

ParamType
optionsShowOptions

Since: 1.0.0


Interfaces

ShowOptions

PropTypeDescriptionDefaultSince
textstringText to display on the Toast1.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. On Android 12 and newer all toasts are shown at the bottom.'bottom'1.0.0
5.0.2

11 months ago

5.0.1

11 months ago

5.0.0

12 months ago

4.0.0

1 year ago

1.1.0

2 years ago