sileo-vue3
v0.1.6
Published
An opinionated, physics based toast notification library for Vue.
Downloads
193
Maintainers
Readme
sileo-vue3 mirrors the runtime and API style of the React package, but exposes a Vue-first integration with Toaster and the sileo toast API.
Installation
npm i sileo-vue3Getting Started
<script setup lang="ts">
import { Toaster, sileo } from "sileo-vue3";
import "sileo-vue3/styles.css";
function notify() {
sileo.success({
title: "Saved",
description: "Your changes have been stored.",
});
}
</script>
<template>
<Toaster position="top-right" />
<button type="button" @click="notify">Show toast</button>
</template>Exports
import { Toaster, sileo } from "sileo-vue3";
import "sileo-vue3/styles.css";API
sileo.show(options)sileo.success(options)sileo.error(options)sileo.warning(options)sileo.info(options)sileo.action(options)sileo.promise(promise, options)sileo.dismiss(id)sileo.clear(position?)
