0.9.12 • Published 3 years ago

vue-notification-bell v0.9.12

Weekly downloads
525
License
MIT
Repository
-
Last release
3 years ago

A Vue UI component for showing notifications. Demo Page

How To Install

npm install vue-notification-bell --save

How to use

Inside your vue files:

<template>
  <div id="your-component">
    <notification-bell />
    <!-- Using Component -->
  </div>
</template>
<script>
// Importing Component
import NotificationBell from 'vue-notification-bell'

export default {
  name: 'YourComponentName',
  // ...
  components: {
    NotificationBell // Registering Component
  }
  // ...
}
</script>

List of component props

:warning: Warning: You have to v-bind custom icon path with require function:

v-bind:icon="require(@/assets/path/to/icon.svg)" :heavy_check_mark:

:icon="require(@/assets/path/to/icon.svg)" :heavy_check_mark:

icon="@/assets/path/to/icon.svg" :x:

icon="require(@/assets/path/to/icon.svg)" :x:

propNamedescriptionTypedefault value
sizesize of component in pxnumber30
countnumber of notifications. (zero or below not shown)number0
upperLimitif count is bigger than this number notification shown as +upperLimitnumber99
counterLocationposition of counter box in component. can be one of: upperRight, lowerRight, upperLeft, lowerLeft, top, left, bottom, right and center. If you set top or left prop, this prop will be disabledstringupperRight
topIf you want to set a custom location for counterBox, you can set top distance by this prop. You have to pass value with dimension (e.g. 10px or 20%). If you set this prop the counterLocation prop will be disablednull or stringnull (Location is calculated by counterLocation)
leftIf you want to set a custom location for counterBox, you can set left distance by this prop. You have to pass value with dimension (e.g. 10px or 20%). If you set this prop the counterLocation prop will be disablednull or stringnull (Location is calculated by counterLocation)
fontSizeCustom font size for counter. You have to pass value with dimension. e.g. 20px or 1.5emnull or stringnull (Font size is calculated by size)
counterPaddingCustom padding for counter. You have to pass value with dimension. e.g. 20px or 1.5emnull or stringnull (Padding is calculated by size)
iconcustom notification icon. you have to pass your SVG icon location by require functionnull or stringnull (showing the default bell icon)
iconColorcolor of the bell icon. This property only works with default icon. if you are using custom icon, you have to handle color of the icon in your SVG filestringblack
disabledIconIf you want to show a different Icon when you have zero notification. you can use this prop. pass SVG icon location by require function. this prop only works if you are using custom icon toonull or stringnull (showing the default bell icon)
counterStyleshape of counter box. can be one of: roundRectangle, rectangle, roundstringroundRectangle
counterBackgroundColorbackground color of counter boxstringred
counterTextColorcounter text colorstringwhite
animatedif true, counter increase/decrease by animationbooleanfalse
dingif true, a ding sound is played on new notificationsbooleanfalse
prefixPlusif true, upper limit plus sign is shown as a prefix, otherwise it is shown as a postfixbooleanfalse

Contributing

Visit CONTRIBUTING Page

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build-bundle

Lints and fixes files

npm run lint

License

MIT

0.9.12

3 years ago

0.9.11

3 years ago

0.9.10

3 years ago

0.9.9

3 years ago

0.9.8

3 years ago

0.9.7

3 years ago

0.9.4

3 years ago

0.9.3

3 years ago

0.9.6

3 years ago

0.9.5

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

0.9.0

3 years ago

0.8.15

3 years ago

0.8.14

5 years ago

0.8.13

5 years ago

0.8.12

5 years ago

0.8.11

5 years ago

0.8.10

5 years ago

0.8.9

5 years ago

0.8.7

6 years ago

0.8.6

6 years ago

0.8.5

6 years ago

0.8.4

6 years ago

0.8.3

6 years ago

0.8.2

6 years ago

0.8.1

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago