1.6.6 • Published 6 months ago

@gianrase/vue3-notifications v1.6.6

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

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 nameDefault
primary#000000
primaryDarkrgba(255, 255, 255, 0.9)
bgPrimary#D3D3D3
bgPrimaryDark#373737
bgHover#C3C3C3
bgHoverDark#343434
notificationShadow#0000004d
notificationShadowDark#a0a0a01a
btnCross#000000
btnCrossDarkrgba(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" />
NameTypeDefaultDescription
removeAllMessagestring / (() => string)'Remove all'The message that the 'Remove All Notifications' button will display
isLightModeboolean / (() => boolean)trueChoose between light and dark mode

Usage

Trigger notifications from any file:

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

addNotification(message, type, timeout);
NameTypeDefaultDescription
messagestring / (() => string)noneThe message of the notification
type'info' / 'success' / 'warning' / 'error''info''info' = blue notification / 'success' = green notification / 'warning' = yellow notification / 'error' = red notification
timeoutnumber15000The amount of time the notification will be displayed on the screen in milliseconds
1.6.6

6 months ago

1.6.5

8 months ago

1.6.4

8 months ago

1.6.2

8 months ago

1.6.1

8 months ago

1.5.7

8 months ago

1.5.6

8 months ago

1.5.5

8 months ago

1.5.4

8 months ago

1.5.3

8 months ago

1.5.2

8 months ago

1.5.1

8 months ago

1.4.1

8 months ago

1.3.10

8 months ago

1.3.9

8 months ago

1.3.8

8 months ago

1.3.7

8 months ago

1.3.6

8 months ago

1.3.5

8 months ago

1.3.4

8 months ago

1.3.3

8 months ago

1.3.2

8 months ago

1.3.1

8 months ago

1.2.4

9 months ago

1.2.3

9 months ago

1.2.2

9 months ago

1.2.1

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.0.20

9 months ago

1.0.19

10 months ago

1.0.18

10 months ago

1.0.17

10 months ago

1.0.16

10 months ago

1.0.15

10 months ago

1.0.14

10 months ago

1.0.13

10 months ago

1.0.12

10 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago