@gianrase/vue3-notifications
TypeScript icon, indicating that this package has built-in type declarations

1.6.6 • Public • Published

Vue3 Notifications

Setup

npm install --save @gianrase/vue3-notifications

yarn add @gianrase/vue3-notifications

Add the vue3-notifications dependencies to your primary.js:

import { createApp } from 'vue';
import AppNotifications from '@gianrase/vue3-notifications';
import '@gianrase/vue3-notifications/style.css';

const app = createApp({...});
app.use(AppNotifications, { colors: { ... } });
Color name Default
primary #000000
primaryDark rgba(255, 255, 255, 0.9)
bgPrimary #D3D3D3
bgPrimaryDark #373737
bgHover #C3C3C3
bgHoverDark #343434
notificationShadow #0000004d
notificationShadowDark #a0a0a01a
btnCross #000000
btnCrossDark rgba(255, 255, 255, 0.9)
btnRemoveAll #0644B7
btnRemoveAllDark #0052EA
borderLeftInfo #01579b
borderLeftInfoDark #252cf4
borderLeftSuccess #1b5e20
borderLeftSuccessDark #1cd509
borderLeftWarning #e65100
borderLeftWarningDark #e88400
borderLeftError #c62828
borderLeftErrorDark #f42525

Add the global component to your App.vue:

<AppNotifications removeAllMessage="Remove all" :isLightMode="true" />
Name Type Default Description
removeAllMessage string / (() => string) 'Remove all' The message that the 'Remove All Notifications' button will display
isLightMode boolean / (() => boolean) true Choose between light and dark mode

Usage

Trigger notifications from any file:

import { addNotification } from '@gianrase/vue3-notifications';

addNotification(message, type, timeout);
Name Type Default Description
message string / (() => string) none The message of the notification
type 'info' / 'success' / 'warning' / 'error' 'info' 'info' = blue notification / 'success' = green notification / 'warning' = yellow notification / 'error' = red notification
timeout number 15000 The amount of time the notification will be displayed on the screen in milliseconds

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.6.61latest

Version History

VersionDownloads (Last 7 Days)Published
1.6.61
1.6.50
1.6.40
1.6.20
1.6.10
1.5.70
1.5.60
1.5.50
1.5.40
1.5.30
1.5.20
1.5.10
1.4.10
1.3.100
1.3.90
1.3.80
1.3.70
1.3.60
1.3.50
1.3.40
1.3.30
1.3.20
1.3.10
1.2.40
1.2.30
1.2.20
1.2.10
1.1.30
1.1.20
1.1.10
1.0.200
1.0.190
1.0.181
1.0.170
1.0.160
1.0.150
1.0.140
1.0.130
1.0.120
1.0.110
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i @gianrase/vue3-notifications

Weekly Downloads

2

Version

1.6.6

License

ISC

Unpacked Size

15.7 kB

Total Files

5

Last publish

Collaborators

  • gianrase