Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lili21/svelte-toast
simple toast .
https://github.com/lili21/svelte-toast
Last synced: about 1 month ago
JSON representation
simple toast .
- Host: GitHub
- URL: https://github.com/lili21/svelte-toast
- Owner: lili21
- Created: 2017-05-06T11:11:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T16:37:58.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T21:51:26.765Z (7 months ago)
- Language: JavaScript
- Size: 479 KB
- Stars: 9
- Watchers: 2
- Forks: 4
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# svelte-toast
> a simple toast written by svelte### Demo
[svelte-toast.surge.sh](https://svelte-toast.surge.sh/)
### Installation
```
yarn add svelte-toast
```### Usage
```
import Toast from 'svelte-toast'const toast = new Toast([opts])
toast.show('Hello Svelte'[, opts])
toast.info('Hello Svelte'[, opts])
toast.success('Hello Svelte'[, opts])
toast.error('Hello Svelte'[, opts])
```### Options
option | description | values | default
------------ | ----------- | ------- | -------
position | position of toast | 'top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', 'bottom-right' | 'bottom-center'
duration | display time of toast | in millisecond | 2000
borderRadius | border radius styling | in pixels | 0### Lisence
MIT