Giter VIP home page Giter VIP logo

vue-notification's Introduction

screen shot 2018-03-01 at 10 33 39

npm version npm

Vue.js notifications

Demo

Setup

npm install --save vue-notification

Add dependencies to your main.js:

import Vue           from 'vue'
import Notifications from 'vue-notification'

/*
or for SSR:
import Notifications from 'vue-notification/dist/ssr.js'
*/

Vue.use(Notifications)

Add the global component to your App.vue:

<notifications/>

Trigger notifications from your .vue files:

// simple
this.$notify('Hello user!')

// using options
this.$notify({
  title: 'Important message',
  text: 'Hello user!'
});

Or trigger notifications from other files, for example, your router:

import Vue from 'vue'

Vue.notify({
  title: 'Authorization',
  text: 'You have been logged in!'
})

Usage

Nuxt.js

nuxt.config.js

plugins: [
    { src: '~/plugins/notifications-ssr', ssr: true },
    { src: '~/plugins/notifications-client', ssr: false }
]

notifications-ssr.js

import Notifications from 'vue-notification/dist/ssr.js';
import Vue from 'vue';

Vue.use(Notifications);

notifications-client.js

import Notifications from 'vue-notification';
import Vue from 'vue';

Vue.use(Notifications);

Component props

The majority of settings for the Notifications component are configured using props:

<notifications position="bottom right" classes="my-custom-class"/>

Note that all props are optional.

Name Type Default Description
position String/Array 'top right' Part of the screen where notifications will pop out
width Number/String 300 Width of notification holder, can be %, px string or number.
Valid values: '100%', '200px', 200
classes String/Array 'vue-notification' List of classes that will be applied to notification element
group String null Name of the notification holder, if specified
duration Number 3000 Time (in ms) to keep the notification on screen (if negative - notification will stay forever or until clicked)
speed Number 300 Time (in ms) to show / hide notifications
animation-type String 'css' Type of animation, currently supported types are css and velocity
animation-name String null Animation name required for css animation
animation Object Custom Animation configuration for Velocity animation
max Number Infinity Maximum number of notifications that can be shown in notification holder
reverse Boolean false Show notifications in reverse order
ignoreDuplicates Boolean false Ignore repeated instances of the same notification
closeOnClick Boolean true Close notification when clicked

API

Notifications are triggered via the API:

  this.$notify({
    // (optional)
    // Name of the notification holder
    group: 'foo',

    // (optional)
    // Title (will be wrapped in div.notification-title)
    title: 'This is the <em>title</em>',

    // Content (will be wrapped in div.notification-content)
    text: 'This is some <b>content</b>',

    // (optional)
    // Class that will be assigned to the notification
    type: 'warn',

    // (optional, override)
    // Time (in ms) to keep the notification on screen
    duration: 10000,

    // (optional, override)
    // Time (in ms) to show / hide notifications
    speed: 1000,

    // (optional)
    // Data object that can be used in your template
    data: {}
  })

To remove notifications, include the clean: true parameter.

this.$notify({
  group: 'foo', // clean only the foo group
  clean: true
})

Plugin Options

Configure the plugin itself using an additional options object:

Vue.use(notifications, { name: 'alert' })

All options are optional:

Name Type Default Description
name String notify Defines the instance name. It's prefixed with the dollar sign. E.g. $notify
componentName String notifications The component's name

Note: setting componentName can cause issues when using SSR.

Features

Position

Position the component on the screen using the position prop:

<notifications position="bottom right"/>

It requires a string with two keywords for vertical and horizontal postion.

Format: "<vertical> <horizontal>".

  • Horizontal options: left, center, right
  • Vertical options: top, bottom

Default is "top right".

Width

Width can be set using a number or string with optional % or px extensions:

<notifications :width="100"/>
<notifications width="100"/>
<notifications width="100%"/>
<notifications width="100px"/>

Type

Set the type of a notification (warn, error, success, etc) by adding a type property to the call:

this.$notify({ type: 'success', text: 'The operation completed' })

This will add the type (i.e. "success") as a CSS class name to the .vue-notification element.

See the Styling section for how to hook onto the class and style the popup.

Groups

For different classes of notifications, i.e...

  • authentication errors (top center)
  • app notifications (bottom-right)

...specify the group attribute:

<notifications group="auth" position="top"/>
<notifications group="app"  position="bottom right"/>

Trigger a notification for a specific group by specifying it in the API call:

this.$notify({ group: 'auth', text: 'Wrong password, please try again' })

Customisation

Styling

Vue Notifications comes with default styling, but it's easy to replace with your own.

Specify one or more class hooks via the classes prop on the global component:

<notifications classes="my-notification"/>

This will add the supplied class/classes to individual notification elements:

<div class="vue-notification-wrapper">
  <div class="vue-notification-template my-notification">
    <div class="notification-title">Info</div>
    <div class="notification-content">You have been logged in</div>
  </div>
</div>

Then include custom css rules to style the notifications:

// style of the notification itself
.my-notification {
  ...

  // style for title line
  .notification-title {
    ...
  }

  // style for content
  .notification-content {
    ...
  }

  // additional styling hook when using`type` parameter, i.e. this.$notify({ type: 'success', message: 'Yay!' })
  &.success { ... }
  &.info { ... }
  &.error { ... }
}

Note that the default rules are:

.vue-notification {
  // styling
  margin: 0 5px 5px;
  padding: 10px;
  font-size: 12px;
  color: #ffffff;
  
  // default (blue)
  background: #44A4FC;
  border-left: 5px solid #187FE7;

  // types (green, amber, red)
  &.success {
    background: #68CD86;
    border-left-color: #42A85F;
  }

  &.warn {
    background: #ffb648;
    border-left-color: #f48a06;
  }

  &.error {
    background: #E54D42;
    border-left-color: #B82E24;
  }
}

Content

To completely replace notification content, use Vue's slots system:

<notifications>
  <template slot="body" slot-scope="{ item, close }">
    <div class="my-notification">
      <p class="title">
        {{ item.title }}
      </p>
      <button class="close" @click="close">
        <i class="fa fa-fw fa-close"></i>
      </button>
      <div v-html="props.item.text"/>
    </div>
  </template>
</notifications>

The props object has the following members:

Name Type Description
item Object Notification object
close Function A function to close the notification

Animation

Vue Notification can use the Velocity library to power the animations using JavaScript.

To use, manually install velocity-animate & pass the library to the vue-notification plugin (the reason for doing that is to reduce the size of this plugin).

In your main.js:

import Vue           from 'vue'
import Notifications from 'vue-notification'
import velocity      from 'velocity-animate'

Vue.use(Notifications, { velocity })

In the template, set the animation-type prop:

<notifications animation-type="velocity"/>

The default configuration is:

{
  enter: { opacity: [1, 0] },
  leave: { opacity: [0, 1] }
}

To assign a custom animation, use the animation prop:

<notifications animation-type="velocity" :animation="animation"/>

Note that enter and leave can be an object or a function that returns an object:

computed: {
  animation () {
    return {
      /**
       * Animation function
       * 
       * Runs before animating, so you can take the initial height, width, color, etc
       * @param  {HTMLElement}  element  The notification element
       */
      enter (element) {
        let height = element.clientHeight
        return {
          // animates from 0px to "height"
          height: [height, 0],

          // animates from 0 to random opacity (in range between 0.5 and 1)
          opacity: [Math.random() * 0.5 + 0.5, 0]
        }
      },
      leave: {
        height: 0,
        opacity: 0
      }
    }
  }
}

Programatic closing

const id = Date.now() // This can be any unique number

Vue.notify({
  id,
  text: 'This message will be removed immediately'
});

Vue.notify.close(id);

FAQ

Check closed issues with FAQ label to get answers for most asked questions.

Development

To run a local demo:

# run the demo
cd demo
npm install
npm run dev

To contribute to the library:

# build main library
npm install
npm run build

# run tests
npm run test

# watch unit tests
npm run unit:watch

vue-notification's People

Contributors

abensur avatar bobluursema avatar crcatala avatar davestewart avatar david-desmaisons avatar dependabot[bot] avatar emko4 avatar euvl avatar gabmic avatar kvpt avatar leolux avatar lgraziani2712 avatar marina-mosti avatar martiendt avatar meteorlxy avatar michalsnik avatar mikhailsidorov avatar nbeerbower avatar neeilya avatar nikolawan avatar ninjaparade avatar nipeco avatar rensite avatar sbstnplcn avatar udit99 avatar vishalyadaviit avatar wac2007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-notification's Issues

Strange animation when max = 1

Hi,

I set max = 1 to have only one notification with the default animation:

<notifications position="top center" max="1"ย />

When I show the first notification, it is shown with fade animation. If I show a second notification before the first is hidden, the notification scroll down and then scroll to top.

220kb bundle for notifications?

Great component first of all. The animations are catchy and I'm pretty curious about some implementation details but 220kb for notifications seems too much.

Importing Vue only for sending 2 events is not a good reason to add 80kb to the bundle.
https://github.com/euvl/vue-notification/blob/master/src/index.js#L19

You can do this with a simple encapsulated store
Example here https://github.com/cristijora/vue-paper-dashboard/blob/master/src/components/UIComponents/NotificationPlugin/index.js#L9
And if you want reactivity for the list of notifications you could

Vue.mixin({data:{notificationStore: NotificationStore.state}})
 Object.defineProperty(Vue.prototype, '$notifications', {
      get () {
        return this.$root.notificationStore
      }
    })

This way events which uses the empty Vue instance can be removed easily.
Also I'm pretty sure animations can be done with pure css or maybe you can partially import velocity-animate

Keep up the good work !

How to use it outside vue instance ?

i want to show notification with this plugin every error request in axios interceptor ?

Axios interceptors

axios.interceptors.response.use((response) => {
  return response
}, function (error) {
  console.log('Error Axios Hanlder', error.response)
  this.$notify({
    group: 'foo',
    title: 'Important message',
    text: 'Hello user! This is a notification!'
  })
  return Promise.reject(error)
})

Error

Uncaught (in promise) TypeError: __WEBPACK_IMPORTED_MODULE_2_vue__.default.$notify is not a function
    at eval (index.js?2848:10)
    at <anonymous>

Style error when position="top center"

styles() {
      var object = {}
      var position = []

      this.positionAsArray()
        .forEach(v => {
          if (!position[0] && dirs.y.indexOf(v) != -1) {
            position[0] = v
          }
          if (!position[1] && dirs.x.indexOf(v) != -1) {
            position[1] = v
          }
        })

      return {
        [position[0]] : '0px',
        [position[1]] : '0px'
      }
    }

When position="top center" , get the wrong styles ! The right style should be:

.notifications {
    display: block;
    width: 300px;
    position: fixed;
    z-index: 5000;
    
    top: 0px;
    margin: 0 auto;
    left: 0;
    right: 0;
}

Width is set in inline style

Hi,

since width is set in inline style, I cannot change it in my custom css class.
I think width should not be passed to options but it should be set in css so we can customize it in custom css class.

Support for images

This is a feature request. You should add native support for images.

Right now, I have to do like this:

$vm0.$notify({
	group: 'blabla',
	title: 'Blabla',
	text: { image: 'image.jpg', html:'blabla text' },
});

And reference in template like: props.item.text.image.

How to get config using Laravel Mix

Question/Help:
So I am using Laravel to make my personal website. I have a form to send me a message on there and I want to use your notifications to display whether or not the email was sent after making an ajax request.
Specifically, I am using Laravel Mix to take care of the Webpack stuff. (So maybe that is causing the issue).
Either way, I have attached some snippets from my code so you can have a look and see if you can help me. The set up seemed basic enough on the readme.md but I can't seem to get the notification to show up in the Vue dev tool for Chrome. I am fairly new to Vue so any help you can give would be much appreciated. Your notification components are the best I've found that are readily available.

Here is the basic file system set up for the stuff I have given you. So you understand how things are tied together.
[ js ]
|__ [ components ]
| |Modal.vue (The modal component is used in the Hero component)
| |
Hero.vue
|__ bootstrap.js
|__ app.js (The root Vue instance is here)

Thanks again!

app.js
app
bootstrap.js
bootstrap
modal template with notification template
modal_part1
modal script
modal_part2

how to use callback in this.$notify

Hi,
I would like to know how I use callback after close

this.$notify(MessagensNotificar.success("came in"),function(){
//***** insert another block
......................
});

How to use outside a component

Hello @euvl, great job on this plugin, but i would like to know, how i can use this plugin outside of a vue component, like let say i have an api.js file where am making all my api calls, and i want to make use of the plugin in there.
Thank you.

How to use plugin in other file

I make ResponseHelper for my axios response

<script>
import router from './../router/index'
import store from './../store'

export default {

  responseResolver (response, callback) {
    if (response.data && response.data.success && response.data.success === true &&
        callback && typeof callback === 'function') {
      callback(response)
    } else {
      console.log('success = false')
    }
  },

  errorResolver (error) {
    if (error.response && error.response.data && error.response.data.error && error.response.data.error === 'token_not_provided') {
      console.log('token_not_provided - please login')

    } else if (error.response && error.response.data && error.response.data.error && error.response.data.error === 'invalid_credentials') {
      console.log('invalid_credentials - please login')

      this.$notify({
        group: 'app',
        title: 'Important message!!!',
        text: 'Invalid credentials - please login!'
      })

    } else if (error.response && error.response.data && error.response.data.error && error.response.data.error === 'token_expired') {
      console.log('error - token expired')

      store.dispatch('logout')
      router.go('/login')
    }
  }

}
</script>

my login.vue

<script>
import ResponseHelper from '../helpers/ResponseHelper'

export default {

  data () {
    return {
      email: null,
      password: null
    }
  },
  methods: {
    login () {
      var params = { email: this.email, password: this.password }
      axios
        .post('/authenticate', { params })
        .then(response => {
          this.$store.dispatch('setUser', response)
          this.$router.push('/')
        })
        .catch(error => {
            ResponseHelper.errorResolver(error)
        })
    }
  }

}
</script>

Error:

TypeError: this.$notify is not a function

Add ability to set default parameters

I want to display all notifications on the bottom right corner, but I don't want to configure it every time I invoke notification. Is there a way to set (override) the default configuration options in a single location?

For example, I'd like to be able to do

import Vue           from 'vue'
import Notifications from 'vue-notification'

Vue.use(Notifications, {position: "bottom right"})

Thank you!

Position doesn't seem to work

Even with bottom right in the notification object it still shows up in the top right.

      this.$notify({
        group: 'messages',
        position: 'bottom right',
        title: 'Important message',
        type: 'error',
        text: 'Hello user! This is a notification!'
      });

Is there something that I have incorrect?

Using version 1.3.4

Deprecated: scope, use slot-scope

You should update the README. Replace scope with slot-scope in the custom template example.

Error using the old:
(Emitted value instead of an instance of Error) the "scope" attribute for scoped slots have been deprecated and replaced by "slot-scope" since 2.5. The new "slot-scope" attribute can also be used on plain elements in addition to <template> to denote scoped slots.

How to use plugin directly with <script>

Added script in page:

<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/[email protected]"></script>

Error:

[email protected]:145 Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_0_vue___default.a is not a constructor
    at Object.module.exports ([email protected]:145)
    at __webpack_require__ ([email protected]:30)
    at Object.defineProperty.value ([email protected]:196)
    at __webpack_require__ ([email protected]:30)
    at Object.defineProperty.value ([email protected]:163)
    at __webpack_require__ ([email protected]:30)
    at Object.directions.x ([email protected]:515)
    at __webpack_require__ ([email protected]:30)
    at module.exports.rawScriptExports ([email protected]:76)
    at [email protected]:79

XSS vector

It should be noted somewhere in the documentation that by default title and text are used as HTML. Maybe isSafe option could be added which would use normal binding if isSafe: false instead of v-html.

This XSS vector example will show an alert:

// Page URL: http://localhost:8080/#/items/%3Cimg%20src%3D%22invalid%3A%22%20onerror%3D%22alert('XSS')%22%3E

  created() {
    const itemId = this.$route.params['itemId'];

    this.$http.get(`/api/orders/${itemId}/`).then(response => {
      this.item = response.body;
    }, err => {
      this.$notify({
        title: 'Error',
        text: `Item ${itemId} could not be loaded: ${err}`
      });
    });
  }

Vuex Integration

Just looking for some help/advice on how to integrate with Vuex. Currently, my implementation is:

import Notifications from 'vue-notification'
Vue.use(Notifications)

And this works fine in Vue but when I try to access the $notify from Vuex it doesn't seem to be attached to the Vue instance. I might try to create a Vue component that watches on a store model which just triggers the notification from within in the component. I appreciate this isn't an issue but I'm sure a lot of people will find it helpful. Thanks in advance.

Add a way to listen to new notifications

Hi,
Thanks for vue-notification !
I would like to be able to listen for new notifications with a callback function per example. It can be useful if you want to store notifications on a backend.
What do you think ? I could try and send a PR ?

this.$notify is not defined

when I use it as your README told,it shows that this.$notify is not defined
npm install --save vue-notification

import Vue from 'vue'
import Notifications from 'vue-notification'

Vue.use(Notifications)

this.$notify({
group: 'foo',
title: 'Important message',
text: 'Hello user! This is a notification!'
});

Position Seems not to be Working

This code doesn't seem to be working. it still shows the notifier on the top right position

this.$notify({
  title: this.notifier.title,
  text: this.notifier.message,
  position: 'left bottom',
  speed: 200,
  duration: 5000,
});

"Max" property doesn't work without reverse

HI, the max property works for me only if i set reverse to true

Here is my failing code:

<notifications 
  group="main" 
  :duration="15000" 
  :max="3" 
  :reverse="false" 
  position="bottom left"/>

This code works, but shows notification in reverse order.

<notifications 
  group="main" 
  :duration="15000" 
  :max="3" 
  :reverse="true"
  position="bottom left"/>

Thank you for your help ;)

Pizdec!!!

And normal description - the religion does not allow ?

[Vue warn]: The client-side rendered virtual DOM tree

In my ssr project , there is a warming :

[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.

Add "gravity" flag

If "gravity" flag is set to true - all notifications that are stacked on the one that is being destroyed will "fall" to the fill the empty space. Otherwise they will just stay where they were until destroyed.

Todo: 100% width notification

Hi! Great plugin. One question: is there a way to create notification that occupies 100% width of the window? Thanks!

Default notification item appears behind notification with a group

Suppose you have something like this in your App.vue:

    <notifications />
    <notifications group="errors" :duration="10000" classes="vue-notification error" />

If you do:

this.$notify({
  group: 'errors',
  text: 'Some error message'
})

The error notification will show up as expected. But if you click that error notification, another (default) notification will show up behind it.


I think the problem is here:

if (this.group && this.group != event.group) {

My guess is that that condition should be something like:

if ((this.group && this.group != event.group) || (!this.group && event.group)) {

(or some better written equivalent). Meaning: if the Notifications component does not have a group and the event does, it shouldn't show anything.

If you agree that this is a bug, I can send a PR with a test and a (again, better written) fix.

Thanks!

emit close()

Is it possible to emit when close occurs?

I am using this with Pusher, my channel listens for notifications and pushes them to the listening clients, but I am not sure how I can broadcast when a notification is closed to the listening clients.

Group won't work

Hi. Thank you for good plugin, I like it.

As I understand grouping prevents the same notifications, but if I enable group notifications it won't work.

Vue.http.interceptors.push(function(request, next) {

   next(function(response) {

       switch (response.status) {
           case 401:
               console.error('You are unauthorized');
               this.$notify({
                   group: 'unauthorized', // notifications will work if commented
                   title: 'You are not authorized',
                   type: 'error',
                   text: 'Log out ...',
                   duration: 99999999
               });
               break;
           case 404:
               this.$notify({
                   title: 'Page not found',
                   type: 'error'
               });
               break;
           default:
               this.$notify({
                   title: 'Unknown error'
               });
       }

   });
});

Notifications from child components

I'm confused about how to use this plugin. The $notifiy method rely on $emit to add new notifications to the component. If I got it right, referring to the vue documentation here, I cannot put my notifications component at a top level in the component tree or it will not receive any event.

Where should I put this component ? At the same level that my "emitting" components ? This means that I have to declare it multiple times for each place I want to use it ? I must be missing something.

Add some test coverage

@euvl thanks for creating this fantastic lib! compared with other toast/notification vue libs, and this definitely was the nicest API and great customization (especially slots and even swapping out animation libs).

Would be great to add some test coverage. Might help others contribute to this lib and guard against breaking behavior.

Will push up an example PR shortly

Add .$notifyClean(group_name) call

Add a call that will remove all notifications in specified group:

this.$notifyClean(group_name) // name is arguable ๐Ÿ˜„

(Per discussion with @OasisLiveForever in #27)


As an option call can look like:

this.$notify('clean', 'groupname')

OR

this.$notify({ group: 'groupname', clean: true })

But it might be a bit misleading.

Plugin outputs vue development tip to console

So it took me some time to hunt this down but it turns out that this plugin forces the vue development tip and devtool tip to be displayed in the console regardless of environment (production or dev).

You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
/home/skully/Code/ethercat-gui/node_modules/vue/dist/vue.runtime.common.js:7751 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html

I tried disabling it by force in Vue.config but that didn't help at all.

I then commented all the references of the plugin throughout my code but left the import intact. Toggling the input also toggles the development tip.

I tried this in a clean electron-vue project (https://github.com/SimulatedGREG/electron-vue) with the same results.

A simple import of the plugin causes this tip to appear. I will look through your code to see if I can find where this is coming from

Own properties

Is there no way to pass own props? Like this


this.$notify({
    img: 'https://pbs.twimg.com/profile_images/848471660860538880/pevXVsIp_400x400.jpg',
    link: '/profile/'
    title: 'Message',
    text: 'You got new message'
})

Issue with TypeScript --> type declaration missing

Hi, first of all, thanks for creating such a great notification plugin!

I'm trying to use your plugin in a Vuejs + TypeScript project and I've found an issue due to how the Typescript type declaration works (as you can see in the link below). I've also found a way to make this work in my project but I think it worth you to fix this in your lib code so that vuejs+ts newcomers will find it easier to use.

Cheers!

vuejs/vue-class-component#128

Error: Cannot read property 'offsetHeight' of null

Hello everyone. I started to use vue-notification, everything is ok, but when I opened browser's console, I saw this message Cannot read property 'offsetHeight' of null . It happens after notification's disappearance.
I use vue-notification without any options, do you have any idea?

2018-02-11_12-03-43

2018-02-11_12-20-24

Add clickable text (like 'Undo')

Is there a way to capture click events on text within the notification and prevent it from closing? I've tried a few things, but haven't had any success. My goal would be to have a notification that says something like "John Doe has been archived. Undo".

Not working 2 notifications in components

Am I doing something wrong?
Help -me

                  <notifications group="auth" position="top right"/>
                  <notifications group="app" position="top left"/>


            this.$notify(
              { group: 'auth', text: 'Wrong password, please try again later'},
              { group: 'app', text: 'sdsad'}
            );

Width of vue-notification on mobile

Hey,

it seems like plugin doesn't take mobile devices into account. When width is set to 500px it is still set to 500px on 360px width mobile.

Is it just my misunderstanding of how should I properly work with plugin?

Not all properties are working

I am currently using vue-notification in my vue 2+ project and I realised properties like position,type,width are not working.
Please can you (help me) fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.