Security News
OpenJS: “XZ Utils Cyberattack Likely Not an Isolated Incident”
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
@capacitor/toast
Advanced tools
Weekly downloads
Readme
The Toast API provides a notification pop up for displaying important information to a user. Just like real toast!
npm install @capacitor/toast
npx cap sync
PWA Elements are required for the Toast plugin to work.
import { Toast } from '@capacitor/toast';
const showHelloToast = async () => {
await Toast.show({
text: 'Hello!',
});
};
show(options: ShowOptions) => Promise<void>
Shows a Toast on the screen
Param | Type |
---|---|
options | ShowOptions |
Since: 1.0.0
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. On Android 12 and newer all toasts are shown at the bottom. | 'bottom' | 1.0.0 |
FAQs
The Toast API provides a notification pop up for displaying important information to a user. Just like real toast!
The npm package @capacitor/toast receives a total of 10,478 weekly downloads. As such, @capacitor/toast popularity was classified as popular.
We found that @capacitor/toast demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
Company News
Come meet the Socket team at BSidesSF and RSA! We're sponsoring several fun networking events and we would love to see you there.
Security News
OSI is starting a conversation aimed at removing the excuse of the SaaS loophole for companies navigating licensing and the complexities of doing business with open source.