svelte-message

A Message Component from Svelte.


Keywords
svelte, message, svelte-message, svelte message, toast, svelte toast
License
MIT
Install
npm install svelte-message@1.3.3

Documentation

Svelte Message

A Message Component from Svelte.



Install

npm install svelte-message
pnpm add svelte-message
yarn add svelte-message

Usage

<script>
  import { Message, message } from 'svelte-message'
  const single = false
  const toast = false
</script>

<Message options={{ single, toast }} />

<button on:click={ () => { message.success("success", 3000) } }>success</button>

Other

If you use Vite, need to add exclude:

vite.config.js

optimizeDeps: {
  exclude: ['svelte-message'],
},

License

MIT