Skip to content

Installation

Dionlee Uy edited this page Apr 19, 2023 · 1 revision

NPM

Install via npm:

npm i @dmuy/toast

Include in your app

import '@dmuy/toast/dist/mdtoast.css'
import mdtoast from '@dmuy/toast'

CDN

Use the following if you don't want to host the js and css files:

https://unpkg.com/@dmuy/toast@{version}/dist/mdtoast.css
https://unpkg.com/@dmuy/toast@{version}/dist/mdtoast.js
https://cdn.jsdelivr.net/gh/dmuy/Material-Toast@{version}/dist/mdtoast.css
https://cdn.jsdelivr.net/gh/dmuy/Material-Toast@{version}/dist/mdtoast.js

For production, use the minified version by adding .min to the file name (i.e. mdtoast.min.js)

Note: Replace {version} with the version you want to use.

Local Copy

Copy mdtoast.css and mdtoast.js (or the minified versions *.min.js and *.min.css) in the dist folder and include in your app:

<link rel="stylesheet" type="text/css" href="{path-to}/mdtoast.css">
<script type="text/javascript" src="{path-to}/mdtoast.js"></script>

Note: Replace {path-to} with the absolute or relative path to where you copied the css and js files.

Clone this wiki locally