1.0.5 • Published 3 years ago

toastmessage-js v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

ToastMessageJS

Toast Messages using Vanilla JavaScript and CSS

npm Integration ToastMessageJS

Import Google Icons and place it in head of your HTML file

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

Installation

npm i toastmessage-js

Use generateToast to display the message

import { generateToast } from 'toastmessage-js'

generateToast({
  status: 'success', // 'error' or 'info' or 'warning'
  message: "Ya sure about that? Ya sure about that?",
});

Using Parcel

  1. npm install parcel -g
  2. Create a HTML (index.html) and JavaScript(index.js) files
  3. Follow npm Integration and Installation
  4. In index.js write the code which is in Use generateToast to display the message
  5. Import index.js in index.html with type="module"
    <body>
      <script type="module" src="index.js"></script>
    </body>
  6. parcel index.html

Simple Integration ToastMessageJS

Import Google Icons, Toast Javascript and place it in head of your HTML file

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

<script src="https://cdn.rawgit.com/4akhilkumar/ToastMessageJS/master/toastmessage.js" defer></script>

Use generateToast to display the message

<script>
  generateToast({
    status: 'success', // 'error' or 'info' or 'warning'
    message: "Ya sure about that? Ya sure about that?",
  });
</script>

Output

ToastMessageJS

Reference

Simple Toast Message (Vanilla JavaScript and CSS)

Writing & Publishing your First NPM Package!

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago